|
1 | 1 | import"@testing-library/jest-dom"
|
2 | 2 | importcryptofrom"crypto"
|
| 3 | +import*asutilfrom"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 | constconsoleAsAny=global.consoleasany
|
46 |
| -consoleAsAny[logType]=(message:string):void=>{ |
47 |
| -thrownewError(`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 | +thrownewError(`Failing due to console.${logType} while running test!\n\n${util.format(format, ...args)}`) |
48 | 50 | }
|
49 | 51 | })
|
50 | 52 |
|
|