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
43
44
45
|
var run = require('./helpers').runMochaJSON;
var assert = require('assert');
describe('.only()', function() {
describe('bdd', function() {
it('should run only tests that marked as `only`', function(done) {
run('options/only/bdd.fixture.js', ['--ui', 'bdd'], function(err, res) {
assert(!err);
assert.equal(res.stats.pending, 0);
assert.equal(res.stats.passes, 11);
assert.equal(res.stats.failures, 0);
assert.equal(res.code, 0);
done();
});
});
});
describe('tdd', function() {
it('should run only tests that marked as `only`', function(done) {
run('options/only/tdd.fixture.js', ['--ui', 'tdd'], function(err, res) {
assert(!err);
assert.equal(res.stats.pending, 0);
assert.equal(res.stats.passes, 8);
assert.equal(res.stats.failures, 0);
assert.equal(res.code, 0);
done();
});
});
});
describe('qunit', function() {
it('should run only tests that marked as `only`', function(done) {
run('options/only/qunit.fixture.js', ['--ui', 'qunit'], function(err, res) {
console.log(err);
assert(!err);
assert.equal(res.stats.pending, 0);
assert.equal(res.stats.passes, 5);
assert.equal(res.stats.failures, 0);
assert.equal(res.code, 0);
done();
});
});
});
});
|