Skip to content

[Draft] Demo scheduled-event-emitter ok

Marwan Zibaoui requested to merge 1227-fix-schedule-overwrite into next

This is an attempt at debugging issue #1227

I re-created a unit test with the exact case reported in the issue.

To make the unit test work, I had to add a polyfill for the web extension API as our current setup only partially polyfills all the webext APIs.

In this unit test, we can see that the scheduler is behaving as expected:

  • I reduced the timings so the test doesn't take too long to run (divided all the timings by 100)
  • Asserted that the event handler was called 6 times
  • We can see that the expected warning is being displayed, and not an error

CleanShot_2023-10-06_at_15.08.53_2x

This indicates that the problem might be environment specific, as it can't be replicated when running the code in NodeJS+JSDOM+jest-webext-polyfill. Next up: do some manual testing in chrome and FF to see if the error is reproducible there.

Related to #1227

Edited by Marwan Zibaoui

Merge request reports