Permalink
Browse files

passing circular test

  • Loading branch information...
1 parent 8289787 commit 253ec10c4188202e14466700b451c40e189c6d60 @substack committed Jan 21, 2012
Showing with 20 additions and 0 deletions.
  1. +20 −0 test/circular.js
View
@@ -0,0 +1,20 @@
+var test = require('tap').test;
+var Scrubber = require('../').Scrubber;
+
+test('circular', function (t) {
+ var s = new Scrubber;
+
+ var obj = { a : 1, b : 2 };
+ obj.c = obj;
+
+ t.deepEqual(
+ s.scrub([ obj ]),
+ {
+ arguments : [ { a : 1, b : 2, c : '[Circular]' } ],
+ callbacks : {},
+ links : [ { 'from' : [ '0' ], 'to' : [ '0', 'c' ] } ],
+ }
+ );
+
+ t.end();
+});

0 comments on commit 253ec10

Please sign in to comment.