Skip to content
Snippets Groups Projects
Select Git revision
  • 81570eca3f4ab5d6fb8de8742a0abeb89e4feb27
  • master default protected
2 results

overrides.js

Blame
  • overrides.js 247 B
    class AssertionError extends Error {}
    
    const builtinAssert = console.assert;
    
    console.assert = function assert(assertion, text = 'Assertion Error') {
      builtinAssert(assertion, text);
      if (!assertion) {
        throw new AssertionError(text);
      }
    };