precision-game/js/test.mjs

9 lines
169 B
JavaScript
Raw Normal View History

2023-10-25 17:17:07 +00:00
export function assert (message, check) {
if (typeof check == "function") {
check = check();
}
if (check !== true) {
throw("assertion failure: " + message);
}
}