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
Copy file name to clipboardExpand all lines: README.md
+8-3Lines changed: 8 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ The base class of this package is:
14
14
15
15
## Motivation 💥
16
16
17
-
When running tests in playwright, sometimes you want to mock all network requests. Especially when running tests in a CI environment. This package provides an easy and typesafe way to mock network requests for a whole API.
17
+
When running tests in playwright, sometimes you want to mock all network requests. Especially when running tests in a CI environment. This package provides an easy and type-safe way to mock network requests for a whole API.
18
18
19
19
## Features 🔥
20
20
@@ -30,11 +30,11 @@ When running tests in playwright, sometimes you want to mock all network request
30
30
31
31
✅ Supports EventSource & ndjson
32
32
33
-
✅ Supports WebSockets (beta)
33
+
✅ Supports WebSockets
34
34
35
35
✅ No production dependencies (You need to have playwright installed, of course)
36
36
37
-
✅ ESM & CJS exports
37
+
✅ ESM exports
38
38
39
39
The primary use case for this package is to create a mock server for your tests so that they do not need real network requests.
40
40
@@ -129,6 +129,11 @@ srh.send('World');
129
129
srh.close();
130
130
```
131
131
132
+
## Execution order
133
+
134
+
When two registered stubs match a request URL, the latest stub (registered last) is used to respond.
135
+
136
+
132
137
## Contributing 🧑🏻💻
133
138
134
139
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
0 commit comments