Skip to content

runapptests.js: Workaround for incomplete emulator reset#4252

Open
halemmerich wants to merge 2 commits into
espruino:masterfrom
halemmerich:fixTests
Open

runapptests.js: Workaround for incomplete emulator reset#4252
halemmerich wants to merge 2 commits into
espruino:masterfrom
halemmerich:fixTests

Conversation

@halemmerich

@halemmerich halemmerich commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

This works around the incomplete reset in emu.factoryReset() by a full re-init for every test run.

I have poked around in the emulator itself, but could not get it working correctly. This is a bit slower than it was, but at least the Uncaught SyntaxError: Got [ERASED] expected EOF errors seem to be gone for now. I think it is somehow related to the internal state of Storage that does not get fully reset on factory reset.

The tests do not run in this repo because no apps changed, but you can have a look at the actions output here: https://github.com/halemmerich/BangleApps/actions/runs/27714695139/job/81984461701

@bobrippling

Copy link
Copy Markdown
Collaborator

I'm afraid I don't know enough about the emulator - probably one for @gfwilliams

@halemmerich

halemmerich commented Jun 20, 2026

Copy link
Copy Markdown
Collaborator Author

This is essentially a workaround like #4160 . It is a bit less complex by just doing a complete new initialization of the whole emulator instead of adding logic for waiting for finished commands. I think that should be fixed in the emulators reset methods to prevent internal state surviving.
For now I have removed the testindex stuff from this PR to make this easy to revert when the emulator has been fixed. At least it gets the CI tests working again.

@halemmerich halemmerich changed the title Fix tests runapptests.js: Workaround for incomplete emulator reset Jun 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants