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

qunit.spec.js « only « misc « acceptance « test « mocha-3.1.2 « lib « tests - github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 77bdfcc64f1c8c97515a0ae6dcf5240e775ac131 (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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
'use strict';

// Root Suite
test.only('#Root-Suite, should run this test-case #1', function () {
  (true).should.equal(true);
});

test.only('#Root-Suite, should run this test-case #2', function () {
  (true).should.equal(true);
});

test('#Root-Suite, should not run this test', function () {
  (false).should.equal(true);
});

suite('should only run .only test in this qunit suite');

test('should not run this test', function () {
  (0).should.equal(1, 'this test should have been skipped');
});
test.only('should run this test', function () {
  (0).should.equal(0, 'this .only test should run');
});
test('should run this test, not (includes the title of the .only test)', function () {
  (0).should.equal(1, 'this test should have been skipped');
});

// Mark suite
suite.only('should run all tests in this suite');

test('should run this test #1', function () {
  (true).should.equal(true);
});

test('should run this test #2', function () {
  (true).should.equal(true);
});

test('should run this test #3', function () {
  (true).should.equal(true);
});

// Unmark this suite
suite('should not run any of this suite\'s tests');

test('should not run this test', function () {
  (false).should.equal(true);
});

test('should not run this test', function () {
  (false).should.equal(true);
});

test('should not run this test', function () {
  (false).should.equal(true);
});

// Mark test as `only` override the suite behavior
suite.only('should run only tests that marked as `only`');

test('should not run this test #1', function () {
  (false).should.equal(true);
});

test.only('should not run this test #2', function () {
  (true).should.equal(true);
});

test('should not run this test #3', function () {
  (false).should.equal(true);
});

test.only('should not run this test #4', function () {
  (true).should.equal(true);
});