MCPcopy Index your code
hub / github.com/scriptscat/scriptcat / assertEq

Function assertEq

example/tests/gm_xhr_test.js:1944–1946  ·  view source on GitHub ↗
(a, b, msg)

Source from the content-addressed store, hash-verified

1942 if (!condition) throw new Error(msg || "assertion failed");
1943 }
1944 function assertEq(a, b, msg) {
1945 if (a !== b) throw new Error(msg ? `${msg}: expected ${b}, got ${a}` : `expected ${b}, got ${a}`);
1946 }
1947 function assertDeepEq(a, b, msg) {
1948 const aj = JSON.stringify(a);
1949 const bj = JSON.stringify(b);

Callers 1

runFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected