Closed Aghassi closed 1 week ago
- Where is "dir" suppose to be relative to? I'm using Bazel so where coverage run is not in the repo but it's elsewhere on disk
it suppose to be relative to a dir of your source files. I'm not familiar with Bazel, but front-end builds generally use tools like webpack, esbuild, rollup, etc.
- What file extension am I suppose to target? I'm pretranspiling my code for jest and playwright so I have either CJS or webpack targets. Is the filters extension suppose to be the original file extension or the transpiled extension?
it should be the original file extension (the entryFilter
is for the transpiled extension)
please use filter
option, for example:
all: {
dir: ['./src'],
filter: {
'**/ignored/**': false,
'**/*.js': true
}
},
see minimatch usage: https://github.com/isaacs/minimatch or use funtion:
all: {
dir: ['./src'],
filter: (filePath)=> {
// return true or false
}
},
OK that makes sense. We use all the same frontend tools you mentioned, Bazel is the top level orchestrating tool. The main difference is it copies files from the repo to a separate place on disk and then runs it's commands. So basically I need to try setting dir
to an absolute path that is relative to where the original repo is is my understanding. I will try this today and report back
I've been trying to set it up but I find it does the inverse of what I expect. That is, when I run it covered files report 0 and uncovered files report 100. What I need clarity on is
Thanks again! Really glad this tool exists, it's been a game changer for us.