Skip to content

Setup fake web worker for jest

Paul Slaughter requested to merge ps-fake-web-worker-jest into master

What does this MR do?

Webpack transforms _worker.js modules into nice consumable WebWorkers. Jest does not use Webpack so we don't get this out of the box.

  • Previously: The old solution was to manually replace our workers with a stubbed out WebWorker.
  • Now: Let's provide a fake implementation which is automatically applied to _worker.js modules. This greatly helps us with integration tests that are using web workers.

But why?

  • It's pretty nice that the tests are now actually running these things. 👍
  • It also enables us to write integration tests which are implicitly using theses (see next MR). 🎉

Does this MR meet the acceptance criteria?

Conformity

Edited by Paul Slaughter

Merge request reports

Loading