assert.ts
This file
Path
adapters/deno/test/assert.ts
11 lines 路 393 bytes 路 TypeScript
Last changed by
test: move adapter runtime tests into `adapters/*` (#5466)Yusuke Wadabefore adoption645ddd6
History of this fileTake it
123456789101112export const assertEquals = (actual: unknown, expected: unknown): void => { if (actual !== expected) { throw new Error(`Expected ${JSON.stringify(expected)}, got ${JSON.stringify(actual)}`) }}
export const assertMatch = (actual: string, expected: RegExp): void => { if (!expected.test(actual)) { throw new Error(`Expected ${JSON.stringify(actual)} to match ${expected}`) }}