Skip to content

Commit

Permalink
stringify test using garbage passes
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed Aug 21, 2011
1 parent 006d2aa commit 29db45f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -8,7 +8,8 @@
"test" : "test"
},
"devDependencies" : {
"tap" : "0.0.x"
"tap" : "0.0.x",
"garbage" : "0.0.x"
},
"scripts" : {
"test" : "tap test"
Expand Down
15 changes: 15 additions & 0 deletions test/stringify.js
@@ -0,0 +1,15 @@
var test = require('tap').test;
var json = require('../');
var garbage = require('garbage');

test('stringify', function (t) {
for (var i = 0; i < 50; i++) {
var obj = garbage(50);
t.equal(
json.stringify(obj),
JSON.stringify(obj)
);
}

t.end();
});

0 comments on commit 29db45f

Please sign in to comment.