mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 20:28:11 +00:00
LibJS: Convert most builtin tests to new system
This commit is contained in:
parent
46581773c1
commit
3f97d75778
107 changed files with 2031 additions and 2243 deletions
21
Libraries/LibJS/Tests/builtins/Math/Math.min.js
vendored
21
Libraries/LibJS/Tests/builtins/Math/Math.min.js
vendored
|
@ -1,14 +1,9 @@
|
|||
load("test-common.js");
|
||||
test("basic functionality", () => {
|
||||
expect(Math.min).toHaveLength(2);
|
||||
|
||||
try {
|
||||
assert(Math.min.length === 2);
|
||||
assert(Math.min(1) === 1);
|
||||
assert(Math.min(2, 1) === 1);
|
||||
assert(Math.min(1, 2, 3) === 1);
|
||||
assert(isNaN(Math.min(NaN)));
|
||||
assert(isNaN(Math.min("String", 1)));
|
||||
|
||||
console.log("PASS");
|
||||
} catch {
|
||||
console.log("FAIL");
|
||||
}
|
||||
expect(Math.min(1)).toBe(1);
|
||||
expect(Math.min(2, 1)).toBe(1);
|
||||
expect(Math.min(1, 2, 3)).toBe(1);
|
||||
expect(Math.min(NaN)).toBeNaN();
|
||||
expect(Math.min("String", 1)).toBeNaN();
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue