-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.js
More file actions
69 lines (66 loc) · 1.67 KB
/
test.js
File metadata and controls
69 lines (66 loc) · 1.67 KB
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
var assert = require('assert'),
jsvardump = require('./jsvardump');
// before(function (done) {
// console.log('[describe]before test')
// done();
// });
//
// after(function (done) {
// console.log('[describe]after test')
// done();
// });
//
// beforeEach(function (done) {
// console.log('[it]before every test');
// done();
// });
//
// afterEach(function (done) {
// console.log('[it]after every test')
// done();
// });
describe('#dump', function() {
it('should does not throw exception in the dump(null)', function(){
jsvardump.dump(null);
});
it('should does not throw exception in the dump(string)', function(){
jsvardump.dump({hoge: 'some string'});
});
it('should does not throw exception in the dump(number:0)', function(){
jsvardump.dump(0);
});
it('should does not throw exception in the dump(number:-1)', function(){
jsvardump.dump(-1);
});
it('should does not throw exception in the dump(Array)', function(){
jsvardump.dump([-1,0,1,2,3]);
});
it('should does not throw exception in the dump(boolean:true)', function(){
jsvardump.dump(true);
});
it('should does not throw exception in the dump(boolean:false)', function(){
jsvardump.dump(false);
});
it('should does not throw exception in the dump(nullArray)', function(){
jsvardump.dump([]);
});
it('should does not throw exception in the dump(function)', function(){
jsvardump.dump(function(){
return 0;
});
});
it('should does not throw exception in the dump(multiObject)', function(){
jsvardump.dump({
hoge: 'some string',
array: [1],
nest: {
fuga: 'some string 2',
array: ['some string 3'],
bool: false
},
func: function() {
return 0;
}
});
});
});