ladybird/Libraries/LibJS/Tests/Math.min.js
Emanuele Torre 1d6c8724b9 LibJS: Fix some tests for Math.min()
In some of the tests in Math.min.js, we were testing Math.max() instead
of Math.min()
2020-04-06 15:14:34 +02:00

12 lines
282 B
JavaScript

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");
}