npq 2.5.1 → 2.5.2

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.
@@ -9,6 +9,10 @@ jest.mock('pacote', () => {
9
9
  }
10
10
  })
11
11
 
12
+ jest.mock('node-fetch')
13
+
14
+ const fetch = require('node-fetch')
15
+
12
16
  const SignaturesMarshall = require('../lib/marshalls/signatures.marshall')
13
17
  const pacote = require('pacote')
14
18
 
@@ -46,7 +50,7 @@ describe('Signature test suites', () => {
46
50
  ]
47
51
  })
48
52
  }
49
- global.fetch = jest.fn().mockResolvedValue(mockResponse)
53
+ fetch.mockImplementationOnce(() => Promise.resolve(mockResponse))
50
54
 
51
55
  const testMarshall = new SignaturesMarshall({
52
56
  packageRepoUtils: {
@@ -103,7 +107,7 @@ describe('Signature test suites', () => {
103
107
  ]
104
108
  })
105
109
  }
106
- global.fetch = jest.fn().mockResolvedValue(mockResponse)
110
+ fetch.mockImplementationOnce(() => Promise.resolve(mockResponse))
107
111
 
108
112
  // the manifest() method should throw an error
109
113
  // in this jest mock to simulate a problem:
@@ -1,6 +1,7 @@
1
1
  'use strict'
2
2
 
3
3
  const BaseMarshall = require('./baseMarshall')
4
+ const fetch = require('node-fetch')
4
5
  const pacote = require('pacote')
5
6
 
6
7
  const MARSHALL_NAME = 'provenance'
@@ -1,6 +1,7 @@
1
1
  'use strict'
2
2
 
3
3
  const BaseMarshall = require('./baseMarshall')
4
+ const fetch = require('node-fetch')
4
5
  const pacote = require('pacote')
5
6
 
6
7
  const MARSHALL_NAME = 'signatures'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "npq",
3
- "version": "2.5.1",
3
+ "version": "2.5.2",
4
4
  "description": "marshall your npm/npm package installs with high quality and class 🎖",
5
5
  "bin": {
6
6
  "npq": "./bin/npq.js",