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.
Order of events in each output array is not defined.
As mentioned below, the specs are incomplete: what if
toggle
contains strings that is contained indo
/undo
too?"Performance test" is not actually testing for performance: input size is too small.
namespace
should be passed in as an argument, not as a global variable.Needs actual random tests.
What should happen if you have the following?
I'd expect that you shouldn't have
toggle
in eitherdoActions
orundoActions
, since it's found intoggleActions
, so the result from both of those should be["open.codeWars foo.codeWars", "close.codeWars bar.codeWars", "toggle.codeWars baz.codeWars"]
.That isn't really clear from the description, though: any verb that is found in both
doActions
andundoActions
should be added totoggleActions
, and then any verb found intoggleActions
should be skipped in bothdoActions
andundoActions
if it occurs in either of those. You only covered the case where it's found in bothdoActions
andundoActions
, not when it occurred in only one of them but also intoggleActions
.