Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add tests for double-star behavior
  • Loading branch information
ScottFreeCode committed Aug 1, 2017
commit 26d337aa1b7589f66dbbfe49ff9ff9821ca96897
7 changes: 7 additions & 0 deletions test/integration/fixtures/glob/nested/glob.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
'use strict';

describe('globbing test', function () {
it('should find this test', function () {
// see test/integration/glob.spec.js for details
});
});
21 changes: 21 additions & 0 deletions test/integration/glob.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,27 @@ describe('globbing', function () {
expect(results.stderr).to.contain('Could not find any test files matching pattern');
}, done);
});

describe('double-starred', function () {
it('should find the tests on multiple levels', function (done) {
testGlob.shouldSucceed('"./**/*.js"', function (results) {
expect(results.stdout).to.contain('["end",{"suites":2,"tests":2,"passes":2,"pending":0,"failures":0,');
}, done);
});

it('should not find a non-matching pattern', function (done) {
testGlob.shouldFail('"./**/*-none.js"', function (results) {
expect(results.stderr).to.contain('Could not find any test files matching pattern');
}, done);
});

it('should handle both matching and non-matching patterns in the same command', function (done) {
testGlob.shouldSucceed('"./**/*.js" "./**/*-none.js"', function (results) {
expect(results.stdout).to.contain('["end",{"suites":2,"tests":2,"passes":2,"pending":0,"failures":0,');
expect(results.stderr).to.contain('Could not find any test files matching pattern');
}, done);
});
});
});
});

Expand Down