This repository has been archived by the owner on Jun 5, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
suite.js
84 lines (71 loc) · 1.76 KB
/
suite.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
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
76
77
78
79
80
81
82
83
84
module.exports = {
'equal': function(test) {
test.equal(true, true);
test.done();
},
'notEqual': function(test) {
test.notEqual(true, false);
test.done();
},
'deepEqual': function(test) {
test.deepEqual({a: {b: 'c'}}, {a: {b: 'c'}});
test.done();
},
'notDeepEqual': function(test) {
test.notDeepEqual({a: {b: 'c'}}, {a: {b: 'd'}});
test.done();
},
'strictEqual': function(test) {
test.strictEqual(true, true);
test.done();
},
'notStrictEqual': function(test) {
test.notStrictEqual(true, false);
test.done();
},
'throws': function(test) {
var MyError = function(msg) {
Error.call(this, msg);
};
test.throws(function() {
throw(new MyError("Hello world!"));
}, MyError);
test.done();
},
'doesNotThrow': function(test) {
test.doesNotThrow(function() {
});
test.done();
},
'ifError': function(test) {
test.ifError(false);
test.done();
},
"nested": {
"ok": function(test) {
test.ok(true);
test.done();
},
"notOk": function(test) {
test.notOk(false);
test.done();
}
},
"async": function(test) {
test.ok(true);
process.nextTick(function() {
test.ok(true);
test.done();
});
},
/* "asyncError": function(test) {
process.nextTick(function() {
test.strictEqual(true, false);
test.done();
});
}, */
"log": function(test) {
test.log("Hello world!");
test.done();
}
};