Filter the code for useless character before asserting the code length restriction. That way the user may keep comments and whitespace in their solution.
In JavaScript, it's not necessary to wrap the tests in an IIFE.
You can also leave out the describe-headers if you want. Not the it-headers, those are mandatory. The describe-headers do not add anything in this case.
In general, please, write the most readable code you can for tests. Translators, or people who have to make upgrades because some day, Node 12.x will be retired, will thank you.
You could use assert.isAtMost for the code length check. The default failure message will already make sense.
Done in above fork
Approved
Update Fork
tester(26, 40, 33)
test (since it goes against the input constraint)Filter the code for useless character before asserting the code length restriction. That way the user may keep comments and whitespace in their solution.
I think our solutions might be failed with 128+128 as inputs but they only allow 32-126, so that is not a problem.
This comment is hidden because it contains spoiler information about the solution
ha!
+1
You're welcome!
Keep the
"[code golf]"
in the title?"Co Co Code Golf" !? :D
Alright its now named La La Land.
Thanks for that
Just call it "La La Land"?
Alright @JohanWiltink.
Will remove
describe
header.switch to
assert.isAtMost
as well (thanks for that)OK, that's fixed.
In JavaScript, it's not necessary to wrap the tests in an IIFE.
You can also leave out the
describe
-headers if you want. Not theit
-headers, those are mandatory. Thedescribe
-headers do not add anything in this case.In general, please, write the most readable code you can for tests. Translators, or people who have to make upgrades because some day,
Node 12.x
will be retired, will thank you.You could use
assert.isAtMost
for the code length check. The default failure message will already make sense.Alright there we go. the kata has been fixed. you may try it out
And kindly if u downvoted do upvote (thnx)
.
Loading more items...