Welcome to mirror list, hosted at ThFree Co, Russian Federation.

only.spec.js « integration « test « mocha-3.1.0 « lib « tests - github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 61254ce1d3ef1877f40ac94f91d239f2c7b1893f (plain)
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();
      });
    });
  });
});