|
|
@ -13,6 +13,7 @@ assert.equal('null', inspect(null)); |
|
|
|
assert.equal("\"\\n\\u0001\"", inspect("\n\u0001")); |
|
|
|
|
|
|
|
assert.equal('[]', inspect([])); |
|
|
|
assert.equal('[]', inspect(Object.create([]))); |
|
|
|
assert.equal('[\n 1,\n 2\n]', inspect([1, 2])); |
|
|
|
assert.equal('[\n 1,\n [\n 2,\n 3\n ]\n]', inspect([1, [2, 3]])); |
|
|
|
|
|
|
@ -23,6 +24,9 @@ assert.equal('{\n "a": 1,\n "b": 2\n}', inspect({a: 1, b: 2})); |
|
|
|
assert.equal('{\n "a": {}\n}', inspect({'a': {}})); |
|
|
|
assert.equal('{\n "a": {\n "b": 2\n }\n}', inspect({'a': {'b': 2}})); |
|
|
|
|
|
|
|
var value = {} |
|
|
|
var value = {}; |
|
|
|
value['a'] = value; |
|
|
|
assert.equal('{\n "a": [Circular]\n}', inspect(value)); |
|
|
|
value = Object.create([]); |
|
|
|
value.push(1); |
|
|
|
assert.equal('{\n "0": 1,\n "length": 1\n}', inspect(value)); |