LibJS: Uncomment Number.isInteger() tests that now pass :^)

This commit is contained in:
Linus Groh 2021-07-11 22:03:04 +01:00
commit 54e1180f61
Notes: sideshowbarker 2024-07-18 09:15:21 +09:00

View file

@ -7,9 +7,9 @@ test("basic functionality", () => {
expect(Number.isInteger(5)).toBeTrue();
expect(Number.isInteger(5.0)).toBeTrue();
expect(Number.isInteger(5 + 1 / 10000000000000000)).toBeTrue();
// FIXME: values outside of i32's range should still return true
// expect(Number.isInteger(+2147483647 + 1)).toBeTrue();
// expect(Number.isInteger(-2147483648 - 1)).toBeTrue();
expect(Number.isInteger(+2147483647 + 1)).toBeTrue();
expect(Number.isInteger(-2147483648 - 1)).toBeTrue();
// FIXME: This should return true
// expect(Number.isInteger(99999999999999999999999999999999999)).toBeTrue();
expect(Number.isInteger(5 + 1 / 1000000000000000)).toBeFalse();