Fix build in IE8 (IE8 doesn't support Object.freeze)
This commit is contained in:
@@ -64,10 +64,12 @@ describe("j$.pp", function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("should stringify immutable circular objects", function(){
|
it("should stringify immutable circular objects", function(){
|
||||||
var frozenObject = {foo: {bar: 'baz'}};
|
if(Object.freeze){
|
||||||
frozenObject.circular = frozenObject;
|
var frozenObject = {foo: {bar: 'baz'}};
|
||||||
frozenObject = Object.freeze(frozenObject);
|
frozenObject.circular = frozenObject;
|
||||||
expect(j$.pp(frozenObject)).toEqual("{ foo: { bar: 'baz' }, circular: <circular reference: Object> }");
|
frozenObject = Object.freeze(frozenObject);
|
||||||
|
expect(j$.pp(frozenObject)).toEqual("{ foo: { bar: 'baz' }, circular: <circular reference: Object> }");
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
it("should truncate arrays that are longer than j$.MAX_PRETTY_PRINT_ARRAY_LENGTH", function() {
|
it("should truncate arrays that are longer than j$.MAX_PRETTY_PRINT_ARRAY_LENGTH", function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user