diff options
Diffstat (limited to 'test/JsonSpec.js')
| -rw-r--r-- | test/JsonSpec.js | 4 | 
1 files changed, 4 insertions, 0 deletions
| diff --git a/test/JsonSpec.js b/test/JsonSpec.js index b0bb15bc..2bd7241f 100644 --- a/test/JsonSpec.js +++ b/test/JsonSpec.js @@ -15,6 +15,10 @@ describe('json', function(){      expect(toJson({$$some:'value', 'this':1, '$parent':1}, false)).toEqual('{}');    }); +  it('should not serialize this or $parent', function(){ +    expect(toJson({'this':'value', $parent:'abc'}, false)).toEqual('{}'); +  }); +    it('should serialize strings with escaped characters', function() {      expect(toJson("7\\\"7")).toEqual("\"7\\\\\\\"7\"");    }); | 
