Better support in pretty printer when an object has null prototype

- Fixes #500
This commit is contained in:
slackersoft
2014-01-17 19:56:43 -10:00
parent 2670bb40a7
commit 15aa3ecb5d
3 changed files with 9 additions and 2 deletions
+7
View File
@@ -121,5 +121,12 @@ describe("j$.pp", function () {
expect(j$.pp(obj)).toEqual("strung");
});
it("should handle objects with null prototype", function() {
var obj = Object.create(null);
obj.foo = 'bar';
expect(j$.pp(obj)).toEqual("{ foo : 'bar' }");
});
});