Exclude files from test

Viewed 230

I'm using a code for requiring all src files except main.js for coverage. What I need is to add one more file to ignore, or ignore all files that have this extension.

const srcContext = require.context('../../src/renderer', true, /^\.\/(?!main(\.js)?$)/)

This is what I'm using, I need to also exclude _icons.scss or exclude all .scss from coverage. I tried implementing some new regex but it does not work as expected

Thanks!

1 Answers
Related