Skip to content

Commit

Permalink
Test should also pass on RN
Browse files Browse the repository at this point in the history
  • Loading branch information
kneth committed Apr 18, 2024
1 parent d588b77 commit 8652a07
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion integration-tests/tests/src/tests/shared-realms.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,18 @@ describe("SharedRealm operations", () => {
schema: [IntSchema],
});

// Infinity is not a valid integer. Node and RN throw different error messages so we only
// check if throws.
// node: "The number Infinity cannot be converted to a BigInt because it is not an integer"
// RN: "number is not integral"
expect(() => {
realm.write(() => {
realm.create(IntSchema.name, {
id: 1,
number: Infinity,
});
});
}).to.throw("The number Infinity cannot be converted to a BigInt because it is not an integer");
}).to.throw();
});

it("Double field accepts Infinity", async () => {
Expand Down

0 comments on commit 8652a07

Please sign in to comment.