-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(sync): always ignore node_modules in sync mode
BREAKING CHANGE: Also includes an update to glob / minimatch. As described in 378de99 > Since glob 6 removes support for comment and negation patterns, this may > or may not be a breaking change from fileset's pov.
- Loading branch information
Showing
3 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
var assert = require('assert'); | ||
var fileset = require('..'); | ||
var EventEmitter = require('events').EventEmitter; | ||
|
||
describe('Sync API - Given a **.md pattern', function() { | ||
it('returns the list of matching file in this repo', function() { | ||
var results = fileset.sync('*.md', 'test/fixtures/**/*.md'); | ||
assert.ok(Array.isArray(results), 'should be an array'); | ||
assert.ok(results.length, 'should return at least one element'); | ||
assert.equal(results.length, 2, 'actually, should return only two'); | ||
}); | ||
}); | ||
|
||
describe('Sync API - Given a *.md and **.js pattern, and two exclude', function() { | ||
it('returns the list of matching file in this repo', function() { | ||
var results = fileset.sync('*.md *.js', 'CHANGELOG.md test/fixtures/**/*.md test/fixtures/**/*.js'); | ||
|
||
assert.ok(Array.isArray(results), 'should be an array'); | ||
assert.ok(results.length, 'should return at least one element'); | ||
|
||
assert.equal(results.length, 7, 'actually, should return only 7'); | ||
}); | ||
}); |