Maybe some of the asserts would be useful as a teststep in the apptests?
Yes, absolutely - I was expecting that as tests got added we might want to have some different steps in there.
How does the emulator handle "hardware" like GPS?
Right now it doesn't, but I guess a good option would be to have a test step like GPS that actually just called Bangle.emit("GPS",{....}) to fake the GPS, so then you know exactly which coordinates are being fed in and can then check that the code is doing the right thing.
As I understand it right now things like GPS power are always off in the emulator, but maybe that could be changed or we just upload some boilerplate before the test that replaces Bangle.setGPSPower() with some JS that does what we want
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.
That would be great!
Yes, absolutely - I was expecting that as tests got added we might want to have some different steps in there.
Right now it doesn't, but I guess a good option would be to have a test step like
GPS
that actually just calledBangle.emit("GPS",{....})
to fake the GPS, so then you know exactly which coordinates are being fed in and can then check that the code is doing the right thing.As I understand it right now things like GPS power are always off in the emulator, but maybe that could be changed or we just upload some boilerplate before the test that replaces
Bangle.setGPSPower()
with some JS that does what we want