You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't get this to work with latest stable jest (24.9.0).
If I use setupFilesAfterEnv or import 'jest-allure/dist/setup' manually, my tests do not run and jest detects 0 tests:
> jest
FAIL tests/main.ts
● Test suite failed to run
Your test suite must contain at least one test.
at node_modules/@jest/core/build/TestScheduler.js:242:24
at asyncGeneratorStep (node_modules/@jest/core/build/TestScheduler.js:131:24)
at _next (node_modules/@jest/core/build/TestScheduler.js:151:9)
at node_modules/@jest/core/build/TestScheduler.js:156:7
at node_modules/@jest/core/build/TestScheduler.js:148:12
at onResult (node_modules/@jest/core/build/TestScheduler.js:271:25)
----------|----------|----------|----------|----------|-------------------|
----------|----------|----------|----------|----------|-------------------|
All files | 0 | 0 | 0 | 0 | |
main.ts | 0 | 100 | 0 | 0 |... 12,13,15,17,21 |
wait.ts | 0 | 0 | 0 | 0 | 1,2,3,4,7 |
----------|----------|----------|----------|----------|-------------------|
If I comment them out, my tests pass.
I have tried putting the import at the end of my tests.
jest.config.js
module.exports={clearMocks: true,moduleFileExtensions: ['ts','js'],testEnvironment: 'node',// testRunner: 'jest-circus/runner', // Not compatible with jest-alluretransform: {'^.+\\.ts$': 'ts-jest'},collectCoverage: true,collectCoverageFrom: ['src/**/*.ts'],testRegex: '(/tests/[^/]+)\\.ts$',verbose: true,setupFilesAfterEnv: ['jest-allure/dist/setup'],};
The text was updated successfully, but these errors were encountered:
I am facing the same issue that it cannot find the tests after i added this setupFilesAfterEnv: ['jest-allure/dist/setup'], if I remove it it can find the test....
Just for the people with the same issues, according the comment above, at least using "describe" instead of only "test" can solve the problem for now..
I can't get this to work with latest stable jest (24.9.0).
If I use
setupFilesAfterEnv
orimport 'jest-allure/dist/setup'
manually, my tests do not run and jest detects 0 tests:If I comment them out, my tests pass.
I have tried putting the
import
at the end of my tests.jest.config.js
The text was updated successfully, but these errors were encountered: