Thanks for this. I have over 200 unit tests running under a watch and the 1st 1 or two runs complete in less than 1 sec. Each subsequent run, gets slower and slower, and after about 4 or 5 or so, it becomes totally unusable and I have to restart it.
I’m trying to implement your method, but I’m stuck at the webpack ‘Alias’. I use it extensively for directories (I have the ‘index.js’ file in each directory to point to the default export for the directory e.g. export { default } from ‘./searchBar’;) so I dont have to have the relative directory paths in my import statements.
How do I resolve those webpack directory aliases in the script?
(e.g., ‘’actions’ : path.join(PATHS.app, ‘actions’)’, ‘components’ : path.join(PATHS.app, ‘components’),)
The script fails because it cant find the modules in those directories.
Thanks for your help