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!
Good idea, but using if like that is less efficient because it forces the computer to check everything sequentially. For example, if the day is Tuesday (3), it still has to check Sunday and Monday first! Using a switch statement instead would be faster because the computer can jump straight to the correct day. Just a suggestion, but your code is still okay!"
done
fixed it
Woops, I missed 2 slight issues with the sample tests (wrong import) and initial solution setup (wrong return type).
This fork fixes them.
Approved
fixed
Since the sample tests do not include all fixed submissions tests, the fixed submission tests should provide the user with the input string if the user solution fails.
This can either be done in the assertion messages (3rd argument to strictEqual), or via the name of the
itblock (as is currently done in the random tests).done
I'm assuming you used the exist JS version as a base.
chai.config.truncateThresholdis set to 0 to ensure chai prints the entirety of the input when a test fails.This was probably done for a reason, and since the submission tests match JS as well, you should too.
It should suffice to do the following change to the chai import:
Approved
Upgrade Node to 22, use chai, fixed missing
itblocks in submission testsIn the testcases, please check if you can replace
const _ = require('lodash');withimport * as _ from "lodash";in order to be consistent with the other imports.Typescript translation! please review as the author of this kata is inactive
Typescript translation! please review as the author of this kata is inactive
Loading more items...