diff --git a/js/tests/less_test.js b/js/tests/less_test.js new file mode 100644 index 000000000..bd5f30dd1 --- /dev/null +++ b/js/tests/less_test.js @@ -0,0 +1,15 @@ +export const tests = [] +const t = (f) => tests.push(f) + +t(() => typeof less === 'function') +t(() => less.length === 1) + +t(() => less(5) === 4) +t(() => less(1) === 0) +t(() => less(0) === -1) +t(() => less(-1) === -2) + +const rand = Math.random() +t(() => less(rand) === rand - 1) + +Object.freeze(tests) \ No newline at end of file