Setup fake web worker for jest
- Step 1: Setup fake web worker for jest
- Step 2: Fix Sourcegraph with MR diffs
- Upstream PR: Update GitLab domFunctions to use new interop
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
-
📋 Does this MR need a changelog?-
I have included a changelog entry. -
I have not included a changelog entry because no user-facing changes.
-
-
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Edited by Paul Slaughter