Skip to content

Commit

Permalink
fix (test): fix serializer length test
Browse files Browse the repository at this point in the history
  • Loading branch information
sorattorafa committed Nov 7, 2022
1 parent d9257de commit 2cc5738
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions test/unit/serializers/cbor.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe("Test CborSerializer", () => {
needAck: false
};
const s = serializer.serialize(cloneDeep(obj), P.PACKET_EVENT);
expect(s.length).toBe(160);
expect(s.length).toBe(162);

const res = serializer.deserialize(s, P.PACKET_EVENT);
expect(res).not.toBe(obj);
Expand All @@ -58,7 +58,7 @@ describe("Test CborSerializer", () => {
needAck: false
};
const s = serializer.serialize(cloneDeep(obj), P.PACKET_EVENT);
expect(s.length).toBe(160);
expect(s.length).toBe(162);

const res = serializer.deserialize(s, P.PACKET_EVENT);
expect(res).not.toBe(obj);
Expand All @@ -83,7 +83,7 @@ describe("Test CborSerializer", () => {
needAck: false
};
const s = serializer.serialize(cloneDeep(obj), P.PACKET_EVENT);
expect(s.length).toBe(160);
expect(s.length).toBe(162);

const res = serializer.deserialize(s, P.PACKET_EVENT);
expect(res).not.toBe(obj);
Expand Down
6 changes: 3 additions & 3 deletions test/unit/serializers/msgpack.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe("Test MsgPackSerializer", () => {
needAck: false
};
const s = serializer.serialize(cloneDeep(obj), P.PACKET_EVENT);
expect(s.length).toBe(154);
expect(s.length).toBe(156);

const res = serializer.deserialize(s, P.PACKET_EVENT);
expect(res).not.toBe(obj);
Expand All @@ -58,7 +58,7 @@ describe("Test MsgPackSerializer", () => {
};

const s = serializer.serialize(cloneDeep(obj), P.PACKET_EVENT);
expect(s.length).toBe(154);
expect(s.length).toBe(156);

const res = serializer.deserialize(s, P.PACKET_EVENT);
expect(res).not.toBe(obj);
Expand All @@ -84,7 +84,7 @@ describe("Test MsgPackSerializer", () => {
};

const s = serializer.serialize(cloneDeep(obj), P.PACKET_EVENT);
expect(s.length).toBe(154);
expect(s.length).toBe(156);

const res = serializer.deserialize(s, P.PACKET_EVENT);
expect(res).not.toBe(obj);
Expand Down
6 changes: 3 additions & 3 deletions test/unit/serializers/notepack.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe("Test NotePackSerializer", () => {
needAck: false
};
const s = serializer.serialize(cloneDeep(obj), P.PACKET_EVENT);
expect(s.length).toBe(154);
expect(s.length).toBe(156);

const res = serializer.deserialize(s, P.PACKET_EVENT);
expect(res).not.toBe(obj);
Expand All @@ -58,7 +58,7 @@ describe("Test NotePackSerializer", () => {
needAck: false
};
const s = serializer.serialize(cloneDeep(obj), P.PACKET_EVENT);
expect(s.length).toBe(154);
expect(s.length).toBe(156);

const res = serializer.deserialize(s, P.PACKET_EVENT);
expect(res).not.toBe(obj);
Expand All @@ -83,7 +83,7 @@ describe("Test NotePackSerializer", () => {
needAck: false
};
const s = serializer.serialize(cloneDeep(obj), P.PACKET_EVENT);
expect(s.length).toBe(154);
expect(s.length).toBe(156);

const res = serializer.deserialize(s, P.PACKET_EVENT);
expect(res).not.toBe(obj);
Expand Down

0 comments on commit 2cc5738

Please sign in to comment.