test-exclude
Advanced tools
Comparing version 3.2.0 to 3.2.1
@@ -5,2 +5,12 @@ # Change Log | ||
<a name="3.2.1"></a> | ||
## [3.2.1](https://github.com/istanbuljs/test-exclude/compare/v3.2.0...v3.2.1) (2016-11-14) | ||
### Bug Fixes | ||
* fix bug matching files in root, introduced by dotfiles setting ([27b249c](https://github.com/istanbuljs/test-exclude/commit/27b249c)) | ||
<a name="3.2.0"></a> | ||
@@ -7,0 +17,0 @@ # [3.2.0](https://github.com/istanbuljs/test-exclude/compare/v3.1.0...v3.2.0) (2016-11-14) |
10
index.js
@@ -84,2 +84,8 @@ const assign = require('object-assign') | ||
} | ||
// Any rules of the form **/foo.js, should also match foo.js. | ||
if (/^\*\*\//.test(pattern)) { | ||
result = result.concat(pattern.replace(/^\*\*\//, '')) | ||
} | ||
return result.concat(pattern) | ||
@@ -96,9 +102,7 @@ }, []) | ||
'test{,-*}.js', | ||
'*.test.js', | ||
'**/*.test.js', | ||
'**/__tests__/**', | ||
'**/node_modules/**', | ||
'node_modules/**' | ||
'**/node_modules/**' | ||
] | ||
module.exports = exportFunc |
{ | ||
"name": "test-exclude", | ||
"version": "3.2.0", | ||
"version": "3.2.1", | ||
"description": "test for inclusion or exclusion of paths using pkg-conf and globs", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -18,2 +18,6 @@ /* global describe, it, context */ | ||
it('matches files in root with **/', function () { | ||
exclude().shouldInstrument('__tests__/**').should.equal(false) | ||
}) | ||
it('does not instrument files outside cwd', function () { | ||
@@ -86,7 +90,5 @@ exclude().shouldInstrument('../foo.js').should.equal(false) | ||
'test{,-*}.js', | ||
'*.test.js', | ||
'**/*.test.js', | ||
'**/__tests__/**', | ||
'**/node_modules/**', | ||
'node_modules/**' | ||
'**/node_modules/**' | ||
]) | ||
@@ -93,0 +95,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
17870
241