Skip to content

Commit cbd534f

Browse files
committed
readme
1 parent 449c1af commit cbd534f

4 files changed

Lines changed: 1427 additions & 712 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ node_modules/**
22
lib/**
33
playwright-report
44
test/junit.xml
5-
test/output
5+
test/test/output

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,16 @@ blogStub.stub('GET', 'test?{refresh?:boolean}', ({ body, params }) => {
9595
blogStub.stub('GET', 'test?{props:number[]}', ({ params }) => {
9696
params.props.forEach(x => console.log(x));
9797
});
98+
99+
100+
// You can remove a stub with its handle or all stubs at once
101+
const handle = blogStub.stub('GET', 'test?{props:number[]}', ({ params }) => {
102+
params.props.forEach(x => console.log(x));
103+
});
104+
handle.unregister(); // remove this stub
105+
// Or:
106+
107+
blogStub.unregisterAll(); // remove all stubs
98108
```
99109

100110
## Strongly typed api parameters

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "playwright-easy-network-stub",
3-
"version": "6.0.0",
3+
"version": "6.0.1",
44
"main": "lib/index.js",
55
"repository": "https://github.com/LoaderB0T/playwright-easy-network-stub.git",
66
"author": {
@@ -23,21 +23,21 @@
2323
"lint": "pnpm eslint ./src/**"
2424
},
2525
"devDependencies": {
26-
"@awdware/eslint-config-base": "^2.1.0",
26+
"@awdware/eslint-config-base": "^2.1.1",
2727
"@awdware/eslint-config-nodejs": "^2.0.0",
2828
"@awdware/prettier-config": "^1.0.0",
29-
"@playwright/test": "^1.47.2",
30-
"@types/node": "^20.12.7",
31-
"@types/ws": "^8.5.10",
32-
"easy-network-stub": "^7.1.0",
33-
"eslint": "^9.11.1",
29+
"@playwright/test": "^1.52.0",
30+
"@types/node": "^22.15.18",
31+
"@types/ws": "^8.18.1",
32+
"easy-network-stub": "^7.3.0",
33+
"eslint": "^9.26.0",
3434
"eslint-plugin-import": "2.31.0",
3535
"eslint-plugin-unused-imports": "4.1.4",
36-
"prettier": "^3.3.3",
37-
"rimraf": "^5.0.5",
36+
"prettier": "^3.5.3",
37+
"rimraf": "^6.0.1",
3838
"ts-node": "^10.9.2",
39-
"typescript": "^5.4.5",
40-
"typescript-eslint": "8.8.0"
39+
"typescript": "^5.8.3",
40+
"typescript-eslint": "8.32.1"
4141
},
4242
"peerDependencies": {
4343
"@playwright/test": ">= 1.18.0",

0 commit comments

Comments
 (0)