1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-18 16:45:09 +00:00
serenity/Libraries/LibJS/Tests/builtins/NaN/NaN.js
2020-07-06 23:40:35 +02:00

13 lines
357 B
JavaScript

test("basic functionality", () => {
const nan = undefined + 1;
expect(nan + "").toBe("NaN");
expect(NaN + "").toBe("NaN");
expect(nan !== nan).toBeTrue();
expect(NaN !== NaN).toBeTrue();
expect(nan).toBeNaN();
expect(NaN).toBeNaN();
expect(0).not.toBeNaN();
expect(!!nan).toBeFalse();
expect(!!NaN).toBeFalse();
});