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
|
-
|
|
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
|
-
|
|
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:
|