/
dryRun.spec.js
42 lines (36 loc) · 1.12 KB
/
dryRun.spec.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
'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();
});
});
it('should pass without "RangeError: maximum call stack size exceeded"', function (done) {
var fixture = path.join('options/dry-run', 'stack-size');
runMochaJSON(fixture, args, function (err, res) {
if (err) {
return done(err);
}
expect(res, 'to have passed test count', 400);
done();
});
});
});