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.
Great kata but the key order thing is annoying. Either include the expected order in the description or use Chai instead of Codewars' test framework.
Issue still exists.
Probably Test.assertSimilar compare Object.keys array, JSON.stringify or something like that.
Please use other compare function.
Being the result an object, I don't think the sorting order is important.
Did it fail you if you try to sort the results differently? Have you tried?
The comment below
the result is sort by key like this:['ATF6', 'CREB', 'cMyc', 'Gata1', 'AhR']
. This information should be in the description of the kata.Sorry, I am afraid I don't quite get your issue. Could you elaborate more?
why on earth is this marked as spoiler?
order of results not specified
the result is sort by key like this:['ATF6', 'CREB', 'cMyc', 'Gata1', 'AhR']
it happens because
So the ATF6: "TGACGT" binds the sequence "TGACGTGACGT" twice at index 1 and 6 with an overlapping T:
the "TGCGTGCGTG" sequence relative to AhR: "TGCGTG" contains an overlapping TG:
Hope it is clear now, cheers!
It seems pretty interesting Kata, but i Don't understand it. Why ("TGACGTGACGT"),{ ATF6: [ 1, 6 ] }), ("TGCGTGCGTG"),{ AhR: [ 1, 5 ] }) ?
Who could explain please?
....Sort the values
have you tried to sort the result in a final step?
I have the same problem :(.
I seem to get everything right but the order of the result object properties prevents me from passing all the tests. Shouldn't I pass as long as the object has all the keys and its values regardless of the order of the properties?
Expected: {"ATF6":[5],"cMyc":[1]}, instead got: {"cMyc":[1],"ATF6":[5]}
It has been a nice kata to do! I have learnt new things about RegExp working with this one.
Thanks! :)
Loading more items...