-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
141 additions
and
104 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
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
35 changes: 35 additions & 0 deletions
35
test/integration/fixtures/options/dry-run/dry-run.fixture.js
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,35 @@ | ||
'use strict'; | ||
|
||
describe.only('suite1', function() { | ||
it.skip('test1 - report as skipped', function() { }); | ||
|
||
it('test2 - report as passed', function() { }); | ||
|
||
it('test3 - report as passed', function() { | ||
throw new Error('this test should not run'); | ||
}); | ||
}); | ||
|
||
describe('suite2', function () { | ||
before(function() { | ||
throw new Error('this hook should not run'); | ||
}); | ||
beforeEach(function() { | ||
throw new Error('this hook should not run'); | ||
}); | ||
|
||
it.only('test4 - report as passed', function () { | ||
throw new Error('this test should not run'); | ||
}); | ||
|
||
it('test5 - should be ignored', function () { | ||
throw new Error('this test should not run'); | ||
}); | ||
|
||
afterEach(function() { | ||
throw new Error('this hook should not run'); | ||
}); | ||
after(function() { | ||
throw new Error('this hook should not run'); | ||
}); | ||
}); |
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,30 @@ | ||
'use strict'; | ||
|
||
var path = require('path').posix; | ||
var helpers = require('../helpers'); | ||
var runMochaJSON = helpers.runMochaJSON; | ||
|
||
describe('--dry-run', function() { | ||
var args = ['--dry-run']; | ||
|
||
it('should only report, but not execute any test', function(done) { | ||
var fixture = path.join('options/dry-run', 'dry-run'); | ||
runMochaJSON(fixture, args, function(err, res) { | ||
if (err) { | ||
return done(err); | ||
} | ||
|
||
expect(res, 'to have passed') | ||
.and( | ||
'to have passed tests', | ||
'test2 - report as passed', | ||
'test3 - report as passed', | ||
'test4 - report as passed' | ||
) | ||
.and('to have passed test count', 3) | ||
.and('to have pending test count', 1) | ||
.and('to have failed test count', 0); | ||
done(); | ||
}); | ||
}); | ||
}); |
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
Oops, something went wrong.