I just tried it on the banglejs 2 emulator and it worked fine, I'm pretty new to Espruino myself but 2 things I'd check, is the firmware up to date and can you run it directly in the terminal?
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 just tried it on the banglejs 2 emulator and it worked fine, I'm pretty new to Espruino myself but 2 things I'd check, is the firmware up to date and can you run it directly in the terminal?