Socket
Socket
Sign inDemoInstall

nock

Package Overview
Dependencies
Maintainers
4
Versions
430
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nock - npm Package Compare versions

Comparing version 13.3.0 to 13.3.1

1

lib/socket.js

@@ -43,2 +43,3 @@ 'use strict'

unref() {}
write() {}

@@ -45,0 +46,0 @@ address() {

6

package.json

@@ -10,3 +10,3 @@ {

],
"version": "13.3.0",
"version": "13.3.1",
"author": "Pedro Teixeira <pedro.teixeira@gmail.com>",

@@ -32,3 +32,3 @@ "repository": {

"devDependencies": {
"@definitelytyped/dtslint": "^0.0.112",
"@definitelytyped/dtslint": "^0.0.159",
"@sinonjs/fake-timers": "^10.0.0",

@@ -64,3 +64,3 @@ "assert-rejects": "^1.0.0",

"lint:js:fix": "eslint --cache --cache-location './.cache/eslint' --fix '**/*.js'",
"lint:ts": "dtslint types",
"lint:ts": "dtslint --expectOnly types",
"test": "nyc --reporter=lcov --reporter=text mocha tests",

@@ -67,0 +67,0 @@ "test:coverage": "open coverage/lcov-report/index.html"

@@ -1542,6 +1542,6 @@ # Nock

// References:
// https://github.com/nock/nock/issues/699#issuecomment-272708264
// https://github.com/axios/axios/issues/305
axios.defaults.adapter = require('axios/lib/adapters/http')
// https://github.com/axios/axios/pull/5277
axios.defaults.adapter = 'http'
test('can fetch test response', async t => {

@@ -1563,2 +1563,14 @@ // Set up the mock request.

For Nock + Axios + Jest to work, you'll have to also adapt your jest.config.js, like so:
```js
const config = {
moduleNameMapper: {
// Force CommonJS build for http adapter to be available.
// via https://github.com/axios/axios/issues/5101#issuecomment-1276572468
'^axios$': require.resolve('axios'),
},
}
```
[axios]: https://github.com/axios/axios

@@ -1565,0 +1577,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc