Better assertion error language (#56)

This commit is contained in:
Eric Eastwood 2022-08-30 18:45:10 -05:00 committed by GitHub
parent 6568fc7102
commit b45c31a597
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -3,7 +3,7 @@
function assert(value, message) {
console.assert(value, message);
if (!value) {
throw new Error(`Assertion Error: ${value} == true`);
throw new Error(`AssertionError: expected ${value} to be truthy`);
}
}