Skip to content

Commit

Permalink
Test JS integers serializing
Browse files Browse the repository at this point in the history
  • Loading branch information
bartblast committed Oct 17, 2024
1 parent b4fd765 commit 3c5d6f3
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/javascript/serializer_test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,22 @@ describe("Serializer", () => {
});
});

describe("integer", () => {
it("top-level", () => {
const term = 234;
const expected = "[1,234]";

assert.equal(serialize(term), expected);
});

it("nested", () => {
const term = {a: 123, b: 2};
const expected = '[1,{"a":123,"b":2}]';

assert.equal(serialize(term), expected);
});
});

describe("null", () => {
it("top-level", () => {
const term = null;
Expand Down

0 comments on commit 3c5d6f3

Please sign in to comment.