MCPcopy Create free account
hub / github.com/Effect-TS/effect / assertMatch

Function assertMatch

packages/vitest/src/utils.ts:151–155  ·  view source on GitHub ↗
(actual: string, regExp: RegExp, ..._: Array<never>)

Source from the content-addressed store, hash-verified

149 * @since 4.0.0
150 */
151export function assertMatch(actual: string, regExp: RegExp, ..._: Array<never>) {
152 if (!regExp.test(actual)) {
153 fail(`Expected\n\n${actual}\n\nto match\n\n${regExp}`)
154 }
155}
156
157/**
158 * Asserts that `thunk` throws, optionally checking the thrown value against an expected `Error` or validation function.

Callers

nothing calls this directly

Calls 1

failFunction · 0.70

Tested by

no test coverage detected