mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-24 02:03:06 -05:00
LibJS: Split isNaN tests into multiple sections
This commit is contained in:
parent
1ef573eb30
commit
8ebdf685a6
Notes:
sideshowbarker
2024-07-19 05:03:45 +09:00
Author: https://github.com/linusg Commit: https://github.com/SerenityOS/serenity/commit/8ebdf685a64 Pull-request: https://github.com/SerenityOS/serenity/pull/2689 Reviewed-by: https://github.com/mattco98
1 changed files with 5 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue