When unit testing my Angular 2 application using Karma, I encountered an issue with my directory structure:
└── src/
├── index.js
├── index.js.text
├── index.test.js
├── README.txt
├── startuptest.js
├── lib/
| ├── util.js
| ├── util.test.js
| └── filters/
| ├── kalman.js
| └── lowpass.js
├── test/
| ├── main.js
| └── lib/
| ├── filters.js
| └── util.js
└── vendor/
├── jquery.js
└── three/
├── three.js
└── three.fps.js
I want to exclude all files under the path:
src/lib/!(filters)/**
from the coverage report while keeping all other files in the directory.
I attempted to achieve this using the configuration below:
{src/**, src/lib/!(filters)/**}/!(*.spec!).js : coverage
However, this setup is skipping everything. How can I properly exclude only specific files?
For more information, you can refer to this link.