forked from tape-testing/tape
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathundef.js
34 lines (31 loc) · 892 Bytes
/
undef.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
var tape = require('../');
var tap = require('tap');
var concat = require('concat-stream');
tap.test('array test', function (tt) {
tt.plan(1);
var test = tape.createHarness();
test.createStream().pipe(concat(function (body) {
tt.equal(
body.toString('utf8'),
'TAP version 13\n'
+ '# undef\n'
+ 'not ok 1 should be equivalent\n'
+ ' ---\n'
+ ' operator: deepEqual\n'
+ ' expected: |-\n'
+ ' { beep: undefined }\n'
+ ' actual: |-\n'
+ ' {}\n'
+ ' ...\n'
+ '\n'
+ '1..1\n'
+ '# tests 1\n'
+ '# pass 0\n'
+ '# fail 1\n'
);
}));
test('undef', function (t) {
t.plan(1);
t.deepEqual({}, { beep: undefined });
});
});