- throws<E>(fn, errorClassOrMsg?, msgIncludesOrMsg?, msg?): E | Error | unknown
Parameters
- fn: (() => unknown)
- (): unknown
Returns unknown
Optional
errorClassOrMsg: string | (new (...args) => E)Optional
msgIncludesOrMsg: stringOptional
msg: string
Returns E | Error | unknown
Deprecated
请使用assertThrows代替。