ignore types for direct mockImpl calls
This commit is contained in:
parent
ddd5a37928
commit
78cf681580
|
@ -17,6 +17,7 @@ describe("contentSecurityPolicy middleware", () => {
|
||||||
set: jest.fn(),
|
set: jest.fn(),
|
||||||
}
|
}
|
||||||
next = jest.fn()
|
next = jest.fn()
|
||||||
|
// @ts-ignore
|
||||||
crypto.randomBytes.mockReturnValue(Buffer.from(mockNonce, "base64"))
|
crypto.randomBytes.mockReturnValue(Buffer.from(mockNonce, "base64"))
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -58,6 +59,7 @@ describe("contentSecurityPolicy middleware", () => {
|
||||||
it("should handle errors and log an error message", async () => {
|
it("should handle errors and log an error message", async () => {
|
||||||
const consoleSpy = jest.spyOn(console, "error").mockImplementation()
|
const consoleSpy = jest.spyOn(console, "error").mockImplementation()
|
||||||
const error = new Error("Test error")
|
const error = new Error("Test error")
|
||||||
|
// @ts-ignore
|
||||||
crypto.randomBytes.mockImplementation(() => {
|
crypto.randomBytes.mockImplementation(() => {
|
||||||
throw error
|
throw error
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue