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.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
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:Or even just copy/paste some of the commands out and try running them on Espruino's console.