Open rbosneag opened 7 years ago
If I add a new npm
task to package.json
like:
"test:watch" : "npm test -- --auto-watch --no-single-run",
karma will fire on every change but for all the app tests and not selectively for the modified -spec.ts
or for the associated spec of the modified .ts
file.
Looking further into this.
Hey Chris,
Glad to see you back after almost 2 years 👍
Intro
I used your previous
cg-angular
generator for almost 2 years and got very used to it, even forked it to fit new workflows and used it for most of my projects (sadly I haven't published it recently).For quite a while now I am in the process of switching my projects to TS, components, webpack (went through requirejs and systemjs as well) and somehow got to a structure/workflow that resembles your new generator very well (luckily I got to check your github for changes and stumbled upon the new generator).
Question
In
cg-angular
we used to havegrunt.watch
looking for changes in.js
files and the karma task was starting if a-spec.js
was changed or a .js file that had a-spec
attached.In my webpack flow I took a shot with a new npm task
"watch:test" : "npm test -- --auto-watch --no-single-run"
and had karma configured to look forspec
files and this setup works fine except that it won't run the test if the sourcecomponent
file is changed instead of thespec
file.How can we accomplish this in the new generator?