You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • I'm not really sure what you're expecting - the code doesn't print anything unless there's an error. If you added some print statements to the code then you'd see something. Try changing test to:

    function test(a, b) {
      tests++;
      var ar = a();
      console.log("Expecting "+b);
      console.log("Got "+ar);
      if (ar!=b) {
        console.log("Test "+tests,a,"did not equal",b,", it was ", ar);
      } else {
       testPass++;
      }
    }
    

    Or even just copy/paste some of the commands out and try running them on Espruino's console.

About

Avatar for Gordon @Gordon started