I am trying to exclude a specific file from test coverage in Jest by modifying the collectCoverageFrom
array. The file name contains square brackets, and I have added an entry with a negation for this file.
collectCoverageFrom: [
'./src/**/*.{js,jsx,ts,tsx}',
'!./src/some/path/to/[fileWithSquareBrackets].ts',
]
Despite this configuration, the test coverage data is still being collected for this particular file.