mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
chore: ensure assertions result in a message (#7981)
This commit is contained in:
parent
542019f3a1
commit
4e8e75beb1
@ -186,7 +186,7 @@ export function makeWaitForNextTask() {
|
||||
|
||||
export function assert(value: any, message?: string): asserts value {
|
||||
if (!value)
|
||||
throw new Error(message);
|
||||
throw new Error(message || 'Assertion error');
|
||||
}
|
||||
|
||||
export function debugAssert(value: any, message?: string): asserts value {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user