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.
Oh I'm dumb. I forgot that
methods
only refer to functions, not variables.Javascript sample tests will pass returning any non falsy value (confusing people about those passing and the other tests don't). Don't use
test.expect
, usetest.assertDeepEquals
.Tests are wrong in this way, the sample tests use
test.expect
and that's no way to compare two arrays (try returning[1]
or any non falsy value and it'll pass all sample tests).What you've copied there won't work either (note that you're passing 3 arguments to your function).
The tests on attempt use another way that makes
test.expect
to work, there is a function that compares each element of the expected and actual array with each other.test.assertDeepEquals
should be used.The function name that is being called in sample tests (
difference
) is not the same that function name in final submit (array_diff
) - RustThis comment is hidden because it contains spoiler information about the solution
Sample tests != test suite. Your code is wrong.
When I run the sample tests everything passes, but the final submit does not. Even thought I am runing the same tests at the final submit.