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.
See https://status.codewars.com/incidents/ymg0y1r172sl
We don't consider this an issue. It's a trade-off for providing a more natural experience to the users.
In fact, there are many ways to cheat the system because of the flexibility we provide and it's well known.
We can prevent this specific case, but you can always find ways around it until we lock the system up enough to harm the user experience. So our policy is to only fix something that can accidentally cause the tests to pass and this one doesn't apply.
Note that this "attack" only harms the "attacker" by ruining their learning opportunity. You'll learn more by solving a kata yourself.
We also ban users who heavily cheats or plagiarizes because we don't want them in our community.
Can you improve the test case names? Too much redundancy.
Maybe change the
describe
todescribe("Roman numerals encoder for 1 <= n < 4000", function() {
, and remove everything outside the parens for test case names.The sample tests have
accounts
.Can you also add a semiolon to the solution setup so it compiles?
Please make the following changes:
accounts
parameter indescribe('HelloWorld', function(accounts) {
tests
andrandomNum
(const randomNum = Math.floor(Math.random() * tests.length);
) inside the random test caseI forgot we need to set Chai's
truncateThreshold
to0
forassert.deepEqual
to avoid output likeexpected [ Array(13) ] to deeply equal [ Array(13) ]
.Should be good to merge after this.
Please change
countAndConvert
helper to.map(b => b.toNumber())
method instead of.toString().split(',').map(Number)
await
Use it like
Also, please fix the globals (
i
,x
,n
) in the random tests.Please change the random test assertion to
and remove
console.log
to avoid unnecessary outputs.Loading more items...