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

Function buildNotEqualErrorMessage

expect/_build_message.ts:50–61  ·  view source on GitHub ↗
(
  actual: T,
  expected: T,
  options: EqualErrorMessageOptions = {},
)

Source from the content-addressed store, hash-verified

48}
49
50export function buildNotEqualErrorMessage<T>(
51 actual: T,
52 expected: T,
53 options: EqualErrorMessageOptions = {},
54): string {
55 const { formatter = format, msg } = options;
56 const actualString = formatter(actual);
57 const expectedString = formatter(expected);
58
59 const msgPrefix = msg ? `${msg}: ` : "";
60 return `${msgPrefix}Expected actual: ${actualString} not to be: ${expectedString}.`;
61}

Callers 2

triggerErrorFunction · 0.90
assertNotEqualsFunction · 0.90

Calls 1

formatterFunction · 0.85

Tested by

no test coverage detected