MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / assert

Method assert

test/jest-config.ts:100–114  ·  view source on GitHub ↗
(value, ...message)

Source from the content-addressed store, hash-verified

98 this['_logError']('error', msg);
99 }
100 assert(value, ...message) {
101 if (value) return;
102
103 debugger;
104
105 let msg = '';
106 try {
107 throw new Error();
108 } catch (e) {
109 msg = `${
110 !message ? '' : message.map((x) => serialize(x)).join(' ')
111 }\n${formatStackTrace(e.stack)}\n`;
112 }
113 this['_logError']('assert', msg);
114 }
115 warn(...message) {
116 // `compile()` logs `console.warn('Compilation fallback for …')` whenever it
117 // falls back to interpretation. Many tests (and the benchmark corpora)

Callers 15

literalFunction · 0.80
codePointLengthFunction · 0.80
parse-cortex.tsFile · 0.80
assumeConjunctionFunction · 0.80
assumeNotEqualFunction · 0.80
assumeNotElementFunction · 0.80
assumeEqualityFunction · 0.80
assumeInequalityFunction · 0.80
assumeElementFunction · 0.80
canonicalFunctionLiteralFunction · 0.80
makeLambdaFunction · 0.80

Calls 3

formatStackTraceFunction · 0.85
serializeFunction · 0.70
mapMethod · 0.65

Tested by

no test coverage detected