diff --git a/ext/console/01_console.js b/ext/console/01_console.js index ddc8daf008..d5ed80a634 100644 --- a/ext/console/01_console.js +++ b/ext/console/01_console.js @@ -147,6 +147,12 @@ function getNoColor() { return noColor; } +function assert(cond, msg = "Assertion failed.") { + if (!cond) { + throw new AssertionError(msg); + } +} + // Don't use 'blue' not visible on cmd.exe const styles = { special: "cyan",