We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 14fe8cf commit 26b5ae4Copy full SHA for 26b5ae4
test/JsonTest.js
@@ -75,11 +75,11 @@ JsonTest.prototype.testItShouldPreventRecursion = function () {
75
};
76
77
JsonTest.prototype.testItShouldSerializeOnlyOwnProperties = function() {
78
- var parent = { p: 'p'};
79
- var child = { c: 'c'};
80
- child.__proto__ = parent;
81
- assertEquals('{"c":"c"}', angular.toJson(child));
82
-}
+ var parent = createScope();
+ var child = createScope(parent);
+ child.c = 'c';
+ expect(angular.toJson(child)).toEqual('{"c":"c"}');
+};
83
84
JsonTest.prototype.testItShouldSerializeSameObjectsMultipleTimes = function () {
85
var obj = {a:'b'};
0 commit comments