afterAll hide errors
See original GitHub issue🐛 Bug Report
https://repl.it/@evandrocoan/EnviousMagnificentApplicationpackage
const sum = require('./sum');
describe("Test question and answer audios", () => {
beforeAll(async () => {
console.log("beforeAll");
});
afterAll(async () => {
console.supererror();
console.log("afterAll");
});
test('Timeout on the wrong place...', async () => {
expect(sum(1, 2)).toBe(3);
});
});
Actual behavior
jest
PASS ./sum.test.js
Test question and answer audios
✓ Timeout on the wrong place... (5ms)
console.log sum.test.js:5
beforeAll
Test Suites: 1 passed, 1 total
Tests: 1 passed, 1 total
Snapshots: 0 total
Time: 6.199s
Ran all test suites.
Expected behavior
jest
FAIL ./sum.test.js
Test question and answer audios
✕ Timeout on the wrong place... (3ms)
● Test question and answer audios › Timeout on the wrong place...
TypeError: console.supererror is not a function
7 |
8 | afterAll(async () => {
> 9 | console.supererror();
| ^
10 | console.log("afterAll");
11 | });
12 |
at Object.<anonymous> (sum.test.js:9:13)
Test Suites: 1 failed, 1 total
Tests: 1 failed, 1 total
Snapshots: 0 total
Time: 6.657s
Ran all test suites.
exit status 1
envinfo
npx envinfo --preset jest
npx: installed 1 in 4.22s
System:
OS: Linux 4.15 Debian GNU/Linux 9 (stretch) 9 (stretch)
CPU: (4) x64 Intel(R) Xeon(R) CPU @ 2.30GHz
Binaries:
Node: 12.16.2 - /usr/local/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.14.4 - /usr/local/bin/npm
npmPackages:
jest: ^24.9.0 => 24.9.0
Related:
Issue Analytics
- State:
- Created 3 years ago
- Comments:10
Top Results From Across the Web
Jasmine Karma afterall hides property error - Stack Overflow
An error was thrown in afterAll TypeError: Cannot read properties of undefined (reading 'hide') at SafeSubscriber.
Read more >JUnit 5 User Guide
Similarly, @AfterAll methods declared in an interface are inherited as long as they are not hidden or overridden, and @AfterAll methods from an ......
Read more >PowerShell errors are easy to suppress — but should you?
After all, it's important to know when something isn't working right. If you need to suppress an error, you can use the ErrorAction...
Read more >Error Messages | Cypress Documentation
Test File Errors No tests found This message means that Cypress was unable to find ... You can globally disable animation error checking,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@jayarjo
Follow the
InstallationandConfigurationsteps here: https://www.npmjs.com/package/jest-circusfeel free to send a PR. Or use
jest-cricus- it will be default in 27: #10686