-
-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test-exclude doesn't support absolute paths #34
Comments
Just to make sure I understand what you are saying, can I assume that your above test assumes that const assert = require('assert');
const path = require('path');
const testExclude = require('test-exclude');
function failingTest() {
const exclude = testExclude({
exclude: [path.resolve('file')]
});
assert.equal(exclude.shouldInstrument('./file'), false);
}
function passingTest() {
const exclude = testExclude({
exclude: [path.resolve('file')],
relativePath: false
});
assert.equal(exclude.shouldInstrument(path.resolve('./file')), false);
}
// a call to `failingTest()` will assert, a call to `passingTest()` will not. There are issues mixing of relative and absolute paths, I'm not aware of anything that uses |
Correct, cwd is
|
Mixing does not work as of now. The only correct way (as of now) to exclude
It's a tough situation, we have to be really careful with logic changes to Side note: it appears that the README for test-exclude is incorrect as the examples show passing relative filenames to |
The text was updated successfully, but these errors were encountered: