- Complete React app with 7 developer tools - JSON Tool with visual structured editor - Serialize Tool with visual structured editor - URL, Base64, CSV/JSON, Beautifier, Diff tools - Responsive navigation with dropdown menu - Dark/light mode toggle - Mobile-responsive design with sticky header - All tools working with copy/paste functionality
17 lines
451 B
JavaScript
17 lines
451 B
JavaScript
var inspect = require('../');
|
|
var test = require('tape');
|
|
|
|
test('circular', function (t) {
|
|
t.plan(2);
|
|
var obj = { a: 1, b: [3, 4] };
|
|
obj.c = obj;
|
|
t.equal(inspect(obj), '{ a: 1, b: [ 3, 4 ], c: [Circular] }');
|
|
|
|
var double = {};
|
|
double.a = [double];
|
|
double.b = {};
|
|
double.b.inner = double.b;
|
|
double.b.obj = double;
|
|
t.equal(inspect(double), '{ a: [ [Circular] ], b: { inner: [Circular], obj: [Circular] } }');
|
|
});
|