File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 1
1
import "@testing-library/jest-dom"
2
2
import crypto from "crypto"
3
+ import * as util from "util"
3
4
import { server } from "./src/testHelpers/server"
4
5
5
6
// Polyfill the getRandomValues that is used on utils/random.ts
@@ -43,8 +44,9 @@ CONSOLE_FAIL_TYPES.forEach((logType: string) => {
43
44
// Suppressing the no-explicit-any to override certain console functions for testing
44
45
// eslint-disable-next-line @typescript-eslint/no-explicit-any
45
46
const consoleAsAny = global . console as any
46
- consoleAsAny [ logType ] = ( message : string ) : void => {
47
- throw new Error ( `Failing due to console.${ logType } while running test!\n\n${ message } ` )
47
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
48
+ consoleAsAny [ logType ] = ( format : string , ...args : any [ ] ) : void => {
49
+ throw new Error ( `Failing due to console.${ logType } while running test!\n\n${ util . format ( format , ...args ) } ` )
48
50
}
49
51
} )
50
52
You can’t perform that action at this time.
0 commit comments