mirror of https://github.com/01-edu/public.git
test(js-checkpoint): add test to less exercise
This commit is contained in:
parent
543f309348
commit
c1c514dd8e
|
@ -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…
Reference in New Issue