chore: ensure assertions result in a message (#7981)

This commit is contained in:
Max Schmitt 2021-08-04 17:26:07 +02:00 committed by GitHub
parent 542019f3a1
commit 4e8e75beb1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 {