Skip to content

Commit

Permalink
fix: Add regression test for negative relative globs (#343)
Browse files Browse the repository at this point in the history
  • Loading branch information
phated committed Jun 11, 2023
1 parent 5659934 commit ebe6498
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/src.js
Expand Up @@ -628,6 +628,24 @@ describeStreams('.src()', function (stream) {
);
});

it('supports glob negation with ../ paths (issue 306)', function (done) {
var cwd = path.relative(process.cwd(), __dirname);

function assert(files) {
expect(files.length).toEqual(4);
}

pipeline(
[
vfs.src(['../test/fixtures/*.txt', '!../test/fixtures/bom-*.txt'], {
cwd: cwd,
}),
concatArray(assert),
],
done
);
});

// TODO: need to normalize the path of a directory vinyl object
it('globs a directory with default settings', function (done) {
var inputDirGlob = path.join(inputBase, './f*/');
Expand Down

0 comments on commit ebe6498

Please sign in to comment.