karma-runner / karma-runner/karma
Is there a way to exclude files by preprocessing?
- Dominant language
- JavaScript
- Stars
- 12k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
I have the following config:
```js
files: [
"index.js",
"lib/**/*.js",
"test/**/*.js",
{pattern: "test/pages/**/*", included: false},
{pattern: "test/**/!(*.js)", included: false}
],
preprocessors: {
"index.js": ["browserify"],
"lib/**/*.js": ["browserify"],
"test/**/*.js": ["browserify"],
"test/pages/**/*": []
},
```
No matter which order I try, I can still require the js files from the "pages" subdirectory in my bundle, which means that they are preprocessed by browserify. Is there a way to exclude them?
Contributor guide
Research direction
Start by tracing how the files and preprocessors configuration match paths, especially the test/pages/**/* exclusion, then check how browserify receives matched files. The issue names no source files or tests, so identify the relevant matching and preprocessing tests before changing behavior. Done means JavaScript files under test/pages are not included in the browserify bundle while the other listed patterns still work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 30/100