it("[[Call]] works with numbers", () => {
assertStrictEquals(toIntN(2, 7), -1);
});
+
+ it("[[Call]] works with non‐integers", () => {
+ assertStrictEquals(toIntN(2, 7.21), -1);
+ assertStrictEquals(toIntN(2, Infinity), 0);
+ });
});
describe("toIntegerOrInfinity", () => {
it("[[Call]] works with numbers", () => {
assertStrictEquals(toUintN(2, 7), 3);
});
+
+ it("[[Call]] works with non‐integers", () => {
+ assertStrictEquals(toUintN(2, 7.21), 3);
+ assertStrictEquals(toUintN(2, Infinity), 0);
+ });
});