1
Fork 0
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:
Andreas Kling 2020-04-05 18:55:46 +02:00
parent 9e7dcaa106
commit 003741db1c
3 changed files with 30 additions and 0 deletions

12
Libraries/LibJS/Tests/Math.min.js vendored Normal file
View 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");
}