Skip to content

Commit

Permalink
Fix: Upgrade glob-parent to fix incorrect base when parens in glob pa…
Browse files Browse the repository at this point in the history
…th (closes #70)
  • Loading branch information
phated committed Feb 21, 2017
1 parent 558be7a commit d611fdd
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"dependencies": {
"extend": "^3.0.0",
"glob": "^5.0.3",
"glob-parent": "^2.0.0",
"glob-parent": "^3.0.0",
"micromatch": "^2.3.7",
"ordered-read-streams": "^0.3.0",
"through2": "^0.6.0",
Expand Down
18 changes: 18 additions & 0 deletions test/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,24 @@ describe('glob-stream', function() {
});
});

it('should set the correct base when ( ) in glob', function(done) {
var stream = gs.create('./fixtures/has (parens)/*.dmc', { cwd: __dirname });
should.exist(stream);
stream.on('error', function(err) {
throw err;
});
stream.on('data', function(file) {
should.exist(file);
should.exist(file.path);
should.exist(file.base);
should.exist(file.cwd);
String(file.cwd).should.equal(__dirname);
String(file.base).should.equal(join(__dirname, 'fixtures/has (parens)/'));
String(join(file.path,'')).should.equal(join(__dirname, './fixtures/has (parens)/test.dmc'));
done();
});
});

it('should find files in paths that contain ( )', function(done) {
var stream = gs.create('./fixtures/**/*.dmc', { cwd: __dirname });
var files = [];
Expand Down

0 comments on commit d611fdd

Please sign in to comment.