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 b8be3e5 commit ca4979eCopy full SHA for ca4979e
test/unit/serialize.js
@@ -438,9 +438,14 @@ describe('serialize( obj )', function () {
438
str:'str',
439
fn
440
}
441
+ // case 1. Pass function to serialize
442
expect(serialize(fn, { ignoreFunction: true })).to.equal(`undefined`);
443
+ // case 2. Pass function(arrow) in object to serialze
444
expect(serialize(obj, { ignoreFunction: true })).to.equal("{}");
- expect(serialize(obj2,{ignoreFunction:true})).to.equal(`{"num":123,"str":"str"}`);
445
+ // case 3. Other features should work
446
+ expect(serialize(obj2, { ignoreFunction: true })).to.equal(
447
+ `{"num":123,"str":"str"}`
448
+ );
449
});
450
451
0 commit comments