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.
Too many final tests. I don't think it requires 30.
I am not sure what test case I am failing. I am able to pass all of the My Test cases, but when I submit I get:
Test Passed
Test Passed
Value is not what was expected
2 Passed
1 Failed
0 Errors
Process took 51ms to complete
If someone could point me to what test case I am failing that would be great.
Here are my test cases:
//Some garbage data
var data = {
foo: "dynamic",
bar: {
baz: ["dynamic"]
},
dynamic: true
};
//Your solution
var result = solution(data, "static");
//Expect the values to have been changed
Test.expect(result.foo === "static");
Test.expect(result.bar.baz[0] === "static");
//None of this nonsense
//JSON.parse(JSON.Stringify(data).replace(/dynamic/g, "static"))
Test.expect(result.hasOwnProperty("dynamic"));
Test.expect(!result.hasOwnProperty("static"));
//Return the original object
Test.expect(result === data);
Test.assertEquals(solution('dynamic', 'x'), 'dynamic');
Test.assertSimilar(solution({ foo: 'not dynamic'}, 'static'), { foo: 'not dynamic' });