MCPcopy Create free account
hub / github.com/denoland/std / assertNotEquals

Function assertNotEquals

assert/not_equals.ts:33–43  ·  view source on GitHub ↗
(actual: T, expected: T, msg?: string)

Source from the content-addressed store, hash-verified

31 * @param msg The optional message to display if the assertion fails.
32 */
33export function assertNotEquals<T>(actual: T, expected: T, msg?: string) {
34 if (!equal(actual, expected)) {
35 return;
36 }
37 const actualString = format(actual);
38 const expectedString = format(expected);
39 const msgSuffix = msg ? `: ${msg}` : ".";
40 throw new AssertionError(
41 `Expected actual: ${actualString} not to be: ${expectedString}${msgSuffix}`,
42 );
43}

Callers 11

equals_test.tsFile · 0.90
_pcg32_test.tsFile · 0.90
between_test.tsFile · 0.90
aes_gcm_test.tsFile · 0.90
crypto_test.tsFile · 0.90
not_equals_test.tsFile · 0.90
time_test.tsFile · 0.90
mock_test.tsFile · 0.90

Calls 2

equalFunction · 0.90
formatFunction · 0.90

Tested by

no test coverage detected