test-exclude
Advanced tools
Comparing version 3.0.0 to 3.1.0
@@ -5,2 +5,12 @@ # Change Log | ||
<a name="3.1.0"></a> | ||
# [3.1.0](https://github.com/istanbuljs/test-exclude/compare/v3.0.0...v3.1.0) (2016-11-14) | ||
### Features | ||
* we now support dot folders ([f2c1598](https://github.com/istanbuljs/test-exclude/commit/f2c1598)) | ||
<a name="3.0.0"></a> | ||
@@ -7,0 +17,0 @@ # [3.0.0](https://github.com/istanbuljs/test-exclude/compare/v2.1.3...v3.0.0) (2016-11-13) |
@@ -33,2 +33,3 @@ const assign = require('object-assign') | ||
this.exclude.push('**/node_modules/**') | ||
this.exclude.push('node_modules/**') | ||
} | ||
@@ -62,3 +63,3 @@ | ||
relFile = relFile.replace(/^\.[\\\/]/, '') // remove leading './' or '.\'. | ||
return (!this.include || micromatch.any(relFile, this.include)) && !micromatch.any(relFile, this.exclude) | ||
return (!this.include || micromatch.any(relFile, this.include, {dotfiles: true})) && !micromatch.any(relFile, this.exclude, {dotfiles: true}) | ||
} | ||
@@ -98,5 +99,6 @@ | ||
'**/__tests__/**', | ||
'**/node_modules/**' | ||
'**/node_modules/**', | ||
'node_modules/**' | ||
] | ||
module.exports = exportFunc |
{ | ||
"name": "test-exclude", | ||
"version": "3.0.0", | ||
"version": "3.1.0", | ||
"description": "test for inclusion or exclusion of paths using pkg-conf and globs", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -10,2 +10,3 @@ /* global describe, it, context */ | ||
exclude().shouldInstrument('./banana/node_modules/cat.js').should.equal(false) | ||
exclude().shouldInstrument('node_modules/cat.js').should.equal(false) | ||
}) | ||
@@ -51,2 +52,7 @@ | ||
it("handles folder '.' in path", function () { | ||
const e = exclude() | ||
e.shouldInstrument('test/fixtures/basic/.next/dist/pages/async-props.js').should.equal(false) | ||
}) | ||
it('excludes node_modules folder, even when empty exclude group is provided', function () { | ||
@@ -57,2 +63,3 @@ const e = exclude({ | ||
e.shouldInstrument('./banana/node_modules/cat.js').should.equal(false) | ||
e.shouldInstrument('node_modules/some/module/to/cover.js').should.equal(false) | ||
@@ -69,2 +76,3 @@ e.shouldInstrument('__tests__/a-test.js').should.equal(true) | ||
e.shouldInstrument('./banana/node_modules/cat.js').should.equal(true) | ||
e.shouldInstrument('node_modules/some/module/to/cover.js').should.equal(true) | ||
@@ -82,3 +90,4 @@ e.shouldInstrument('__tests__/a-test.js').should.equal(true) | ||
'**/__tests__/**', | ||
'**/node_modules/**' | ||
'**/node_modules/**', | ||
'node_modules/**' | ||
]) | ||
@@ -85,0 +94,0 @@ }) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16987
235