-
-
Notifications
You must be signed in to change notification settings - Fork 306
/
Copy pathcircular-things.js
36 lines (33 loc) · 965 Bytes
/
circular-things.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
var tape = require('../');
var tap = require('tap');
var concat = require('concat-stream');
tap.test('circular test', function (assert) {
var test = tape.createHarness({ exit : false });
assert.plan(1);
test.createStream().pipe(concat(function (body) {
assert.equal(
body.toString('utf8'),
'TAP version 13\n'
+ '# circular\n'
+ 'not ok 1 should be equal\n'
+ ' ---\n'
+ ' operator: equal\n'
+ ' expected: |-\n'
+ ' {}\n'
+ ' actual: |-\n'
+ ' { circular: [Circular] }\n'
+ ' ...\n'
+ '\n'
+ '1..1\n'
+ '# tests 1\n'
+ '# pass 0\n'
+ '# fail 1\n'
);
}));
test("circular", function (t) {
t.plan(1);
var circular = {};
circular.circular = circular;
t.equal(circular, {});
})
})