Ad
  • Default User Avatar

    It's fine I already figured it out. But to answer your question I don't edit sample cases so yes I'm sure I never added those samples.

  • Default User Avatar

    JS fork (author gone)

    complete overhaul with random tests, sample tests, edge cases (1-letter words), chai assertions

  • Default User Avatar

    i dont see anything in the sample tests. this is an old kata with many issues in JS, it has no sample tests, no random tests, and uses the old Codewars framework. are you sure you did not add those sample tests yourself ? (perhaps long ago; Codewars caches your code and the sample tests unless you click on RESET)

  • Default User Avatar

    Nevermind I figured it out. It turns out that for whatever reason the "TEST" and the "ATTEMPT" use 2 different function names. "TEST" uses toSnakeCase while "ATTEMPT" uses toUnderscore. Very weird first time I've ever seen this on codewars.

  • Default User Avatar

    Thank you but actually I didn't rename it, for me it was called toSnakeCase. Renaming it to toUnderscore breaks it and it says this:

    ReferenceError: toSnakeCase is not defined
        at /home/codewarrior/index.js:45:6
        at /home/codewarrior/index.js:47:5
        at Object.handleError
            <anonymous>
    
  • Default User Avatar

    that's because you renamed the function. it's supposed to be called toUnderscore.

  • Default User Avatar

    There's an issue with the tests once I press "Attempt". It shows this:

    ReferenceError: toUnderscore is not defined
        at it
        at begin
        at it
        at describe
        at /runner/frameworks/javascript/cw-2.js:152:11
        at Promise._execute
        at Promise._resolveFromExecutor
        at new Promise
        at describe
        at /home/codewarrior/index.js:27:5
        at /home/codewarrior/index.js:37:5
        at Object.handleError
    

    I'm using javascript and I have tested multiple solutions even putting them in replit and my solutions are fine.