MCPcopy Create free account
hub / github.com/CodeForBreakfast/eventsourcing / assertMatch

Function assertMatch

packages/bun-test-effect/src/utils.ts:133–137  ·  view source on GitHub ↗
(actual: string, regexp: RegExp, ..._: Array<never>)

Source from the content-addressed store, hash-verified

131 * @since 0.21.0
132 */
133export function assertMatch(actual: string, regexp: RegExp, ..._: Array<never>) {
134 if (!regexp.test(actual)) {
135 fail(`Expected\n\n${actual}\n\nto match\n\n${regexp}`);
136 }
137}
138
139/**
140 * Asserts that `thunk` throws an error.

Callers

nothing calls this directly

Calls 1

failFunction · 0.85

Tested by

no test coverage detected