I tried to reinstall jest many times, tried to run it in no-cache mode.
I'm running jest:
jest --watch ./assets --notify
Config:
"jest": {
"setupTestFrameworkScriptFile": "<rootDir>/assets/tests/setup.js",
"moduleNameMapper": {
"\\.(css|less|scss)$": "<rootDir>/assets/mocks/styleMock.js",
"^((?:libs|stores|components|tests).*)$": "<rootDir>/assets/$1",
"^react-pdf/build/entry.webpack$": "<rootDir>/node_modules/react-pdf"
}
},
Active Filters: filename /./assets/
Pattern Mode Usage
› Press Esc to exit pattern mode.
› Press Enter to filter by a filenames regex pattern.
pattern › *test.jsx
And no any results are displayed, unlike it was using version 20. But if I push enter the pattern will be applied and files will be found successfully.
Please search this issue tracker more thoroughly and you’ll find that this feature has been temporarily disabled because of license migration to MIT. We’re working on watch more plugin system to make it work again.
@thymikee thanks for explanation
I had searched but found no results. @thymikee can you please provide ticket number, so I can follow, when functionality will be returned back?
We're not currently tracking this issue.
Help from the community would be greatly appreciated here. You can use the pluggable interface introduced in #4841. The plugin would be separate from the core Jest repo, but we would love to link to it (and probably host it in https://github.com/jest-community/).
Hey @SimenB I've just been taking a look into this and at the new watch mode pluggable interface.
I'm not sure how a separate plugin would be able to implement the old typeahead functionality without re-implementing a lot of Jest's internals. The previous implementation depended on the SearchSources type (amongst other things) which seems to be derived from the contexts array.
type SearchSources = Array<{|
context: Context,
searchSource: SearchSource
|}>;
Currently a watch mode plugin only receives the globalConfig and an end callback, which doesn't seem enough information to determine which tests to run/show based on the user's filter. Perhaps if searchSources are passed into the active plugin too (here) then this might be possible.
I'm happy to spend some time to get this working but perhaps I am missing something obvious 😆 any help you can offer on explaining the approach to building this would be greatly appreciated :smile:
Hey! Yeah I think a lot of stuff would need to change in order to support this. I'll work on trying to get the infrastructure to a point where it supports the plugins and hopefully make it easier to figure out what's needed to bring the typeahead back
For those following along: #5399
I would just like to say that this was my favorite feature in jest; gonna rollback until it is re-introduced.
Available as of Jest 23.
https://github.com/jest-community/jest-watch-typeahead
(still somewhat experimental, but I was unable to break it when testing it last night. Bug reports (and fixes) welcome!)
Most helpful comment
Available as of Jest 23.
https://github.com/jest-community/jest-watch-typeahead
(still somewhat experimental, but I was unable to break it when testing it last night. Bug reports (and fixes) welcome!)