mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:28:12 +00:00
LibJS: Add Math.min()
This commit is contained in:
parent
9e7dcaa106
commit
003741db1c
3 changed files with 30 additions and 0 deletions
12
Libraries/LibJS/Tests/Math.min.js
vendored
Normal file
12
Libraries/LibJS/Tests/Math.min.js
vendored
Normal file
|
@ -0,0 +1,12 @@
|
|||
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.max(NaN)));
|
||||
assert(isNaN(Math.max("String", 1)));
|
||||
|
||||
console.log("PASS");
|
||||
} catch {
|
||||
console.log("FAIL");
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue