forked from mochajs/mocha
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When using .only on a specific test, make sure that other tests with …
…a subset of the .only tests title isn't also run
- Loading branch information
Showing
7 changed files
with
75 additions
and
7 deletions.
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
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,15 @@ | ||
|
||
describe('should only run .only test in this bdd suite', function() { | ||
it('should not run this test', function() { | ||
var zero = 0; | ||
zero.should.equal(1, 'this test should have been skipped'); | ||
}); | ||
it.only('should run this test', function() { | ||
var zero = 0; | ||
zero.should.equal(0, 'this .only test should run'); | ||
}); | ||
it('should run this test, not (including a subset of the .only test title)', function() { | ||
var zero = 0; | ||
zero.should.equal(1, 'this test should have been skipped'); | ||
}); | ||
}); |
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,16 @@ | ||
|
||
function ok(expr, msg) { | ||
if (!expr) throw new Error(msg); | ||
} | ||
|
||
suite('should only run .only test in this qunit suite'); | ||
|
||
test('should not run this test', function() { | ||
ok(0 === 1, 'this test should have been skipped'); | ||
}); | ||
test.only('should run this test', function() { | ||
ok(0 === 0, 'this .only test should run'); | ||
}); | ||
test('should run this test, not (including a subset of the .only test title)', function() { | ||
ok(0 === 1, 'this test should have been skipped'); | ||
}); |
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,15 @@ | ||
|
||
suite('should only run .only test in this tdd suite', function() { | ||
test('should not run this test', function() { | ||
var zero = 0; | ||
zero.should.equal(1, 'this test should have been skipped'); | ||
}); | ||
test.only('should run this test', function() { | ||
var zero = 0; | ||
zero.should.equal(0, 'this .only test should run'); | ||
}); | ||
test('should run this test, not (including a subset of the .only test title)', function() { | ||
var zero = 0; | ||
zero.should.equal(1, 'this test should have been skipped'); | ||
}); | ||
}); |