Browse Source

test(js-checkpoint): add test to less exercise

CON-2210-TESTS-add-test-of-less-exercise
root 1 year ago
parent
commit
c1c514dd8e
  1. 15
      js/tests/less_test.js

15
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)
Loading…
Cancel
Save