Ad
  • Custom User Avatar

    A "JSON object" might be a string representation of an object ( that's what JSON is for ). You want to specify a regular JS Object object and prevent that confusion.

    Double spaces can't occur. It would be nice to mention that.

    There is no real difference between letters and special characters; only spaces and the rest matters. You might as well simplify the description on this point.

  • Custom User Avatar

    Hi again,

    • When I said "more tests", I wasn't talking about 1000 of them... 'x) 100 are generally enough. Especially now that you removed all the possible edge cases. And you don't need to wrap each single tests in its own it block. That has only interest if you use the bolck to give the input. Otherwise, just wrap all the tests in one single it block
    • your random inputs always have the same length. "Huge" one.
      • There is no point for this size (it just makes the debugging harder for the user)
      • that means strings of one word only will never be tested => bad idea
      • that means ther is no chances to generate values of i at the very beginning or the very end (corener cases checks)
    • you removed all fixed tests from the full test suite (or did I miss the fact you didn't pu any right at the beginning?) => you need fixed tests before the random tests.
    • I forgot to mention that it's not specified if i will always be a valid index of the sentence (apprently, it will)
    • about those fixed tests, be sure you test:
      • sentences of one single word
      • i=0
      • i=input.length-1

    Did you consider reading the authoring documentation...? Because all of this is explained there.

    cheers