Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
approved
Thanks for approving it ^-^
Like this?
address my last remark above and I think it'll be approvable.
I fixed the different style problem
the test block
Should return a boolean
adds no value and should be removed. the asseertion messages and the description make it clear that a boolean is expected. to make it extra clear you can addreturn true;
in the initial code if you want.you addressed my first point but not the second ;-)
Fixed!
randInt()
andreference()
defined twice ?true
should use the same style as those weighed towardsfalse
. in one case you use ait()
block for all the assertions, in the other adescribe()
with ait()
for each assertion: use the same style for both. both styles are fine, but the input should be shown in any case (either in the first parameter ofit()
, or in the 3rd optional parameter ofstrictEqual()
Fixed!
let
declarations, useconst
instead at the site of the assignment.randInt(from, to)
function) and they are wrong, because they generate number with decimals instead of integers. Use arandInt()
function like that one:Then instead of:
You can write:
which is much more legible.
describe('random tests'
scopeI think I fixed it
assert.strictEqual()
fromchai
const
overlet
when possible, andlet
overvar
when possibleJavascript Translation!