I'm running some jest tests with --watch that depend on data fixtures. I want the watch run to trigger when I edit my data files, not just the code.
I've added the following to my package.json specifically adding yaml for moduleFileExtensions but still not having any luck. Based on:
https://jestjs.io/docs/en/configuration#modulefileextensions-arraystring
Is there a setting I could make to the package.json to see if it's even getting picked up at all? I guess next step is to try with a .js config, throw some errors in and see if I'm barking up the wrong tree!
The yaml files are not part of an "import" or otherwise, they are just loaded by my code. So I'm hoping for a way that "touching" the files would re-trigger the watch to run.
Perhaps the watch command needs to also specify what data files to watch?
"jest": {
"verbose": true,
"modulePaths": [
"cdn",
"src"
],
"moduleFileExtensions": [
"js",
"json",
"jsx",
"ts",
"tsx",
"yaml"
]