Skip to content
This repository has been archived by the owner on Oct 23, 2019. It is now read-only.

Commit

Permalink
temp test
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrea Giammarchi committed Mar 13, 2013
1 parent d5f4f50 commit 9ddd724
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Makefile
@@ -1,4 +1,4 @@
.PHONY: var node amd size hint clean test web preview pages dependencies
.PHONY: build var node amd size hint clean test web preview pages dependencies

# repository name
REPO = circular-json
Expand Down
21 changes: 20 additions & 1 deletion test/circular-json.js
Expand Up @@ -98,5 +98,24 @@ wru.test([
o.a.join('') === '~~~~~~'
);
}
}
}/*
,{
name: 'reviver',
test: function() {
var o = {'~':'~'};
o.o = o;
o.a = [o];
var s = CircularJSON.stringify(o);
console.log(s);
var calls = [];
o = CircularJSON.parse(s, function (key, value) {
calls.push(key, value);
if (value instanceof Array) {
calls.o = value[0].constructor;
}
return value;
});
console.log(calls.o);
}
}//*/
]);

0 comments on commit 9ddd724

Please sign in to comment.