I have an Angular project with Karma setup for unit test. The test and coverage works fine for all spec files, but from day to day the app gets bigger and it bothers me to run all tests, even if I'm focusing in a new module, so I wanted to run only some tests that I want to check, for example, I have a pipes folder and all I want to do is to run only the spec files in this folder, I know I can update the context in my test.ts file but I don't want to update and revert that file each time...
I tried to create a new Karma config file and updated the files
property to add only the files I want but it didn't work. I don't know maybe I'm doing it wrong. (See below a portion of the code in this file)
Is there any solution or trick to do this? something like a separate karma config (ex: karma.config.pipes.ts
) file that alters the context ?
// Override dev config
config.set({
files: [
{pattern: '../app/pipes/*.spec.ts'}
]
});