Skip to content

Commit

Permalink
Update magic numbers to match sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
vthibault committed Feb 12, 2020
1 parent 4599ec6 commit 6ac6afe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/unit/serialize.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,17 +336,17 @@ describe('serialize( obj )', function () {
var m = new Map([
['a', 123],
[regexKey, 456],
[Infinity,322]
[Infinity, 789]
]);
expect(serialize(m)).to.be.a('string').equal('new Map([["a",123],[new RegExp(".*", ""),456],[Infinity,322]])');
expect(serialize({t: [m]})).to.be.a('string').equal('{"t":[new Map([["a",123],[new RegExp(".*", ""),456],[Infinity,322]])]}');
expect(serialize(m)).to.be.a('string').equal('new Map([["a",123],[new RegExp(".*", ""),456],[Infinity,789]])');
expect(serialize({t: [m]})).to.be.a('string').equal('{"t":[new Map([["a",123],[new RegExp(".*", ""),456],[Infinity,789]])]}');
});

it('should deserialize a map', function () {
var m = eval(serialize(new Map([
['a', 123],
[null, 456],
[Infinity,322]
[Infinity, 789]
])));
expect(m).to.be.a('Map');
expect(m.get(null)).to.equal(456);
Expand Down

0 comments on commit 6ac6afe

Please sign in to comment.