Comments (2)
Hi, @lavoscore. Thanks for reporting this.
There's no difference between these two snippets:
worker.use(a)
worker.use(b)
worker.use(a, b)
It's prepending values to an array:
Lines 26 to 28 in 7cf34c1
I've added regression tests for your use case and they are passing for worker.use()
and server.use()
:
Could you please take a look at those tests and see if you can spot any difference compared to what you are doing? If the issue still persists for you, please provide a reproduction repository where I can see it. Thanks.
from msw.
Released: v2.3.1 🎉
This has been released in v2.3.1!
Make sure to always update to the latest version (npm i msw@latest
) to get the newest features and bug fixes.
Predictable release automation by @ossjs/release.
from msw.
Related Issues (20)
- intercepted request won't abort on node 20 w/ [email protected]
- List "graphql" as a peer dependency HOT 5
- Addition of Boundary() to setupServer() in react-native with help of AsyncLocalStorage alternative in RN HOT 1
- "TypeError: Failed to parse URL from [object Request]" with Vitest and Happy DOM HOT 1
- Cannot read properties of undefined (reading 'url') HOT 3
- v1: Add generic type to MockedRequest.passthrough() HOT 3
- Request by got + compression hangs forever HOT 1
- "Light Mode" in documentation HOT 1
- Document various URL patterns (colon, asterisk etc.) HOT 3
- Using the wildcard token to try to match random ports doesn't work if preceded by a colon HOT 1
- Error: Package subpath './browser' is not defined by "exports" (React/Vite) HOT 6
- Support option to use customized script to `server.listen()` for consistency with `worker.start()`
- Can't match the handler in tests in nuxt 3 app using useFetch composable HOT 1
- Console log left over HOT 4
- Add cross platform path support to workerDirectory HOT 7
- not compatible with fetch-retry HOT 2
- MSW in fallback mode not intercepting and mocking image binary request HOT 5
- Document ListenOptions HOT 1
- Disabling "navigate" bypass causes TypeError: "Uncaught (in promise) TypeError: Failed to construct 'Request': Cannot construct a Request with a RequestInit whose mode member is set as 'navigate'."
- Requests with ".local" domain name take too long to resolve HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from msw.