You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See #103
Existing guide on how to make `workerize-loader` working with Webpack and Jest wasn't sufficient. I tried given steps in my project and everything seems working as expected 😄
Copy file name to clipboardExpand all lines: README.md
+20-15Lines changed: 20 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -105,6 +105,7 @@ All worker code can now use Promises.
105
105
106
106
### Testing
107
107
108
+
## Without Webpack
108
109
To test a module that is normally imported via `workerize-loader` when not using Webpack, import the module directly in your test:
109
110
110
111
```diff
@@ -113,24 +114,28 @@ To test a module that is normally imported via `workerize-loader` when not using
113
114
114
115
const instance = worker();
115
116
```
116
-
117
-
To test modules that rely on workerized imports when not using Webpack, you'll need to dig into your test runner a bit. For Jest, it's possible to define a custom `transform` that emulates workerize-loader on the main thread:
0 commit comments