diff --git a/test/integration/fixtures/glob/nested/glob.spec.js b/test/integration/fixtures/glob/nested/glob.spec.js new file mode 100644 index 0000000000..235c2f8417 --- /dev/null +++ b/test/integration/fixtures/glob/nested/glob.spec.js @@ -0,0 +1,7 @@ +'use strict'; + +describe('globbing test', function () { + it('should find this test', function () { + // see test/integration/glob.spec.js for details + }); +}); diff --git a/test/integration/glob.spec.js b/test/integration/glob.spec.js index fb2bbf4353..df16d28283 100644 --- a/test/integration/glob.spec.js +++ b/test/integration/glob.spec.js @@ -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); + }); + }); }); });