1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:17:44 +00:00

LibJS: Split isNaN tests into multiple sections

This commit is contained in:
Linus Groh 2020-07-04 18:29:37 +01:00 committed by Andreas Kling
parent 1ef573eb30
commit 8ebdf685a6

View file

@ -1,6 +1,8 @@
test("basic functionality", () => {
test("length is 1", () => {
expect(isNaN).toHaveLength(1);
});
test("arguments that evaluate to false", () => {
expect(isNaN(0)).toBeFalse();
expect(isNaN(42)).toBeFalse();
expect(isNaN("")).toBeFalse();
@ -12,7 +14,9 @@ test("basic functionality", () => {
expect(isNaN([])).toBeFalse();
expect(isNaN(Infinity)).toBeFalse();
expect(isNaN(-Infinity)).toBeFalse();
});
test("arguments that evaluate to true", () => {
expect(isNaN()).toBeTrue();
expect(isNaN(NaN)).toBeTrue();
expect(isNaN(undefined)).toBeTrue();