MCPcopy
hub / github.com/greggman/twgl.js / assertEqual

Function assertEqual

test/assert.js:54–61  ·  view source on GitHub ↗
(actual, expected, msg = '')

Source from the content-addressed store, hash-verified

52}
53
54export function assertEqual(actual, expected, msg = '') {
55 // I'm sure this is not sufficient
56 if (actual.length && expected.length) {
57 assertArrayEqual(actual, expected);
58 } else if (actual !== expected) {
59 throw new Error(`${formatMsg(msg)}expected: ${expected} to equal actual: ${actual}`);
60 }
61}
62
63export function assertStrictEqual(actual, expected, msg = '') {
64 if (actual !== expected) {

Callers 14

assertWebGLErrorFunction · 0.90
assertPixelFromTextureFunction · 0.90
testV3WithoutDestFunction · 0.90
testV3WithoutDest1Function · 0.90
testV3WithDestFunction · 0.90
testV3WithDest1Function · 0.90
program-tests.jsFile · 0.90
callbackFunction · 0.90
testM4WithoutDestFunction · 0.90
testM4WithDestFunction · 0.90

Calls 2

assertArrayEqualFunction · 0.85
formatMsgFunction · 0.85

Tested by

no test coverage detected