Skip to content

Commit c602982

Browse files
committed
Add test case for object members with undefined value. See also issue 27
1 parent 0fea7d7 commit c602982

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/jquery.json.test.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ test( 'Basic toJSON usage', function(){
3232
'{"apple":7,"pear":5}',
3333
'Objects with multiple members should be separated by a comma'
3434
);
35+
equalJSON(
36+
{ apple: undefined, pear: 5 },
37+
'{"pear":5}',
38+
'Objects with a member with value of type undefined should be removed'
39+
);
3540
equalJSON(
3641
2.5,
3742
'2.5',

0 commit comments

Comments
 (0)