• which returns true if the passed string is a palindrome, regardless of capitalisation

  • Random tests feature uppercase and lowercase characters but the kata description doesn't warn about this.

  • Expected: {"name":"Joe Doe","address":"123 Fake Street","year":2010,"married":true,"allergies":"nuts"},
    instead got: {"year":2010,"name":"Joe Doe","address":"123 Fake Street","married":true,"allergies":"nuts"}
    You're comparing objects with JSON.stringify, which means order will affect it. You should compare it by iterating through the object keys and seeing if they're both the same values instead, like this

    function compareObjects(a,b) {
      let keys = Object.keys[a];
      for (let i = 0; i < keys.length; i++) {
        if (a[keys[i]] !== b[keys[i]]) return false;
      }
      return true;
    }
    

    EDIT: oh, just reread the description. "The fields should be in order of their first chronological appearance in a log."
    This still seems silly to me though, as JS objects aren't meant to be ordered anyway AFAIK. If you want it to be ordered, maybe you could make a 2d array instead, like this:

    [["name", "Joe Doe"], ["address", "123 Fake Street"], ["year", 2010], ["married", true], ["allergies", "nuts"]];
    

    Changed label to suggestion.

  • Fixture broken?

    [eval]:31 Test.assertEquals(JSON.stringify(mixin(...log)),'{"name":"Joe Doe","address":"123 Fake Street","year":2010,"married":true,"allergies":"nuts"}',);; ^ SyntaxError: Unexpected token ) at Object.exports.runInThisContext (vm.js:53:16) at Object. ([eval]-wrapper:6:22)
        at 
        at node.js:328:29
        at _combinedTickCallback (internal/process/next_tick.js:67:7)
        at process._tickCallback (internal/process/next_tick.js:98:9)
    
  • Ah, my mistake! When I searched I forgot to include beta kata, so it only showed 11 Palindrome related kata, and all of them were significantly different and more difficult than just testing whether something is a palindrome.

  • Duplicate of a lot of katas.

  • This comment is hidden because it contains spoiler information about the solution