feat: support beforeEach and beforeAll returning cleanup functions #14456
Annotations
4 errors and 2 warnings
run tests:
e2e/__tests__/circusDeclarationErrors.test.ts#L22
expect(received).toMatchSnapshot()
Snapshot name: `defining tests and hooks asynchronously throws 1`
- Snapshot - 4
+ Received + 4
@@ -11,11 +11,11 @@
| ^
13 | afterAll(() => {});
14 | });
15 | });
- at eventHandler (../../packages/jest-circus/build/jestAdapterInit.js:148:38)
+ at eventHandler (../../packages/jest-circus/build/jestAdapterInit.js:151:38)
at test (__tests__/asyncDefinition.test.js:12:5)
● Test suite failed to run
Cannot add a hook after tests have started running. Hooks must be defined synchronously.
@@ -26,11 +26,11 @@
| ^
14 | });
15 | });
16 |
- at eventHandler (../../packages/jest-circus/build/jestAdapterInit.js:114:38)
+ at eventHandler (../../packages/jest-circus/build/jestAdapterInit.js:115:38)
at afterAll (__tests__/asyncDefinition.test.js:13:5)
● Test suite failed to run
Cannot add a test after tests have started running. Tests must be defined synchronously.
@@ -41,11 +41,11 @@
| ^
19 | afterAll(() => {});
20 | });
21 |
- at eventHandler (../../packages/jest-circus/build/jestAdapterInit.js:148:38)
+ at eventHandler (../../packages/jest-circus/build/jestAdapterInit.js:151:38)
at test (__tests__/asyncDefinition.test.js:18:3)
● Test suite failed to run
Cannot add a hook after tests have started running. Hooks must be defined synchronously.
@@ -55,7 +55,7 @@
> 19 | afterAll(() => {});
| ^
20 | });
21 |
- at eventHandler (../../packages/jest-circus/build/jestAdapterInit.js:114:38)
+ at eventHandler (../../packages/jest-circus/build/jestAdapterInit.js:115:38)
at afterAll (__tests__/asyncDefinition.test.js:19:3)
at Object.toMatchSnapshot (e2e/__tests__/circusDeclarationErrors.test.ts:22:16)
|
run tests:
e2e/__tests__/circusDeclarationErrors.test.ts#L22
expect(received).toMatchSnapshot()
Snapshot name: `defining tests and hooks asynchronously throws 1`
- Snapshot - 4
+ Received + 4
@@ -11,11 +11,11 @@
| ^
13 | afterAll(() => {});
14 | });
15 | });
- at eventHandler (../../packages/jest-circus/build/jestAdapterInit.js:148:38)
+ at eventHandler (../../packages/jest-circus/build/jestAdapterInit.js:151:38)
at test (__tests__/asyncDefinition.test.js:12:5)
● Test suite failed to run
Cannot add a hook after tests have started running. Hooks must be defined synchronously.
@@ -26,11 +26,11 @@
| ^
14 | });
15 | });
16 |
- at eventHandler (../../packages/jest-circus/build/jestAdapterInit.js:114:38)
+ at eventHandler (../../packages/jest-circus/build/jestAdapterInit.js:115:38)
at afterAll (__tests__/asyncDefinition.test.js:13:5)
● Test suite failed to run
Cannot add a test after tests have started running. Tests must be defined synchronously.
@@ -41,11 +41,11 @@
| ^
19 | afterAll(() => {});
20 | });
21 |
- at eventHandler (../../packages/jest-circus/build/jestAdapterInit.js:148:38)
+ at eventHandler (../../packages/jest-circus/build/jestAdapterInit.js:151:38)
at test (__tests__/asyncDefinition.test.js:18:3)
● Test suite failed to run
Cannot add a hook after tests have started running. Hooks must be defined synchronously.
@@ -55,7 +55,7 @@
> 19 | afterAll(() => {});
| ^
20 | });
21 |
- at eventHandler (../../packages/jest-circus/build/jestAdapterInit.js:114:38)
+ at eventHandler (../../packages/jest-circus/build/jestAdapterInit.js:115:38)
at afterAll (__tests__/asyncDefinition.test.js:19:3)
at Object.toMatchSnapshot (e2e/__tests__/circusDeclarationErrors.test.ts:22:16)
|
run tests:
e2e/__tests__/circusDeclarationErrors.test.ts#L22
expect(received).toMatchSnapshot()
Snapshot name: `defining tests and hooks asynchronously throws 1`
- Snapshot - 4
+ Received + 4
@@ -11,11 +11,11 @@
| ^
13 | afterAll(() => {});
14 | });
15 | });
- at eventHandler (../../packages/jest-circus/build/jestAdapterInit.js:148:38)
+ at eventHandler (../../packages/jest-circus/build/jestAdapterInit.js:151:38)
at test (__tests__/asyncDefinition.test.js:12:5)
● Test suite failed to run
Cannot add a hook after tests have started running. Hooks must be defined synchronously.
@@ -26,11 +26,11 @@
| ^
14 | });
15 | });
16 |
- at eventHandler (../../packages/jest-circus/build/jestAdapterInit.js:114:38)
+ at eventHandler (../../packages/jest-circus/build/jestAdapterInit.js:115:38)
at afterAll (__tests__/asyncDefinition.test.js:13:5)
● Test suite failed to run
Cannot add a test after tests have started running. Tests must be defined synchronously.
@@ -41,11 +41,11 @@
| ^
19 | afterAll(() => {});
20 | });
21 |
- at eventHandler (../../packages/jest-circus/build/jestAdapterInit.js:148:38)
+ at eventHandler (../../packages/jest-circus/build/jestAdapterInit.js:151:38)
at test (__tests__/asyncDefinition.test.js:18:3)
● Test suite failed to run
Cannot add a hook after tests have started running. Hooks must be defined synchronously.
@@ -55,7 +55,7 @@
> 19 | afterAll(() => {});
| ^
20 | });
21 |
- at eventHandler (../../packages/jest-circus/build/jestAdapterInit.js:114:38)
+ at eventHandler (../../packages/jest-circus/build/jestAdapterInit.js:115:38)
at afterAll (__tests__/asyncDefinition.test.js:19:3)
at Object.toMatchSnapshot (e2e/__tests__/circusDeclarationErrors.test.ts:22:16)
|
run tests
Final attempt failed. Child_process exited with error code 1
|
run tests
Attempt 1 failed. Reason: Child_process exited with error code 1
|
run tests
Attempt 2 failed. Reason: Child_process exited with error code 1
|
Loading