File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 11import "@testing-library/jest-dom"
22import crypto from "crypto"
3+ import * as util from "util"
34import { server } from "./src/testHelpers/server"
45
56// Polyfill the getRandomValues that is used on utils/random.ts
@@ -43,8 +44,9 @@ CONSOLE_FAIL_TYPES.forEach((logType: string) => {
4344 // Suppressing the no-explicit-any to override certain console functions for testing
4445 // eslint-disable-next-line @typescript-eslint/no-explicit-any
4546 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 ) } ` )
4850 }
4951} )
5052
You can’t perform that action at this time.
0 commit comments