(actual: T, expected: T, msg?: string)
| 31 | * @param msg The optional message to display if the assertion fails. |
| 32 | */ |
| 33 | export 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 | } |
no test coverage detected