nock 15.0.0-beta.6 → 15.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +6 -5
  2. package/package.json +4 -3
package/README.md CHANGED
@@ -461,13 +461,14 @@ nock('http://www.google.com')
461
461
  .replyWithError('something awful happened')
462
462
  ```
463
463
 
464
- JSON error responses are allowed too:
464
+ Error objects are allowed too:
465
465
 
466
466
  ```js
467
- nock('http://www.google.com').get('/cat-poems').replyWithError({
468
- message: 'something awful happened',
469
- code: 'AWFUL_ERROR',
470
- })
467
+ nock('http://www.google.com')
468
+ .get('/cat-poems')
469
+ .replyWithError(
470
+ Object.assign(new Error('Connection refused'), { code: 'ECONNREFUSED' }),
471
+ )
471
472
  ```
472
473
 
473
474
  > Note: This will emit an `error` event on the `request` object, not the reply.
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "testing",
8
8
  "isolation"
9
9
  ],
10
- "version": "15.0.0-beta.6",
10
+ "version": "15.0.0",
11
11
  "author": "Pedro Teixeira <pedro.teixeira@gmail.com>",
12
12
  "repository": {
13
13
  "type": "git",
@@ -22,7 +22,7 @@
22
22
  "main": "./index.js",
23
23
  "types": "types",
24
24
  "dependencies": {
25
- "@mswjs/interceptors": "^0.39.3",
25
+ "@mswjs/interceptors": "^0.39.5",
26
26
  "json-stringify-safe": "^5.0.1"
27
27
  },
28
28
  "devDependencies": {
@@ -42,10 +42,11 @@
42
42
  "globals": "^16.1.0",
43
43
  "got": "^11.8.6",
44
44
  "jest": "^29.7.0",
45
- "mocha": "^9.1.3",
45
+ "mocha": "^11.7.2",
46
46
  "npm-run-all": "^4.1.5",
47
47
  "nyc": "^15.0.0",
48
48
  "prettier": "3.2.5",
49
+ "proxyquire": "^2.1.0",
49
50
  "rimraf": "^3.0.0",
50
51
  "semantic-release": "^24.1.0",
51
52
  "sinon": "^17.0.1",