Better assertion error language (#56)
This commit is contained in:
parent
6568fc7102
commit
b45c31a597
|
@ -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`);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue