5 kyu

Thinking & Testing : Wind whispers

Description
Loading description...
Puzzles
Games
  • Please sign in or sign up to leave a comment.
  • KayleighWasTaken Avatar

    JS fork

    • node 18
    • chai, assert, etc
    • yeeted console.log spam
    • markdown description
    • hardens tests against my incorrect solution
  • paul2 Avatar

    Broke my mind))))

  • Voile Avatar

    Approved

  • HerrWert Avatar

    Error message plainly shows that I am returning the expected output, but it is marked as incorrect.

    • myjinxin2015 Avatar

      Are you sure? there is 6 person solved this kata. Can you paste the result or code here?

    • HerrWert Avatar

      Sure, here's what I'm getting:

      ✘ Expected: Can you hear me? hear me r me me e e..., instead got: Can you hear me? hear me r me me e e...

      Am I overlooking something there? They look the same to me. I'm confused!

    • myjinxin2015 Avatar

      Looks very strange...

      Can you paste the code here? and mark as having spoiler content

    • HerrWert Avatar

      This comment has been hidden.

    • myjinxin2015 Avatar

      I can't submit solution.... When I submit, an Error post, about "SSLv3", don't know why...

    • HerrWert Avatar

      I thought I had found the culprit: an extra space after the question mark. But I have checked my code and even added an extra .trim() for good measure, but this problem still persists. My actual output matches the expected output, but is being marked as incorrect.

    • myjinxin2015 Avatar
      console.log(outputString.replace(/ /g,"_"));
      
    • myjinxin2015 Avatar

      or

      return outputString.replace(/ +/g," ")
      
    • HerrWert Avatar

      Thanks for that help. I'm not good with regular expressions. (I avoid them like the plague.)

      These tips got me a little farther, but now I'm failing on various random tests. My code is turning into a mess, so I think I need to take a fresh approach to the whole thing. I think that is exactly the cool thing about your Thinking & Testing katas: As you discover more conditions, the challenge is to go back and refactor your code to account for them from the start, instead of just patching it up with more and more specific tests.

      Thanks for the help. It might take me some time to come up with my new approach to this one.

      Issue marked resolved by HerrWert 9 years ago
    • myjinxin2015 Avatar

      Good luck ;-)