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

Function assertMatch

packages/effect/test/utils/assert.ts:98–102  ·  view source on GitHub ↗
(actual: string, regExp: RegExp, ..._: Array<never>)

Source from the content-addressed store, hash-verified

96}
97
98export function assertMatch(actual: string, regExp: RegExp, ..._: Array<never>) {
99 if (!regExp.test(actual)) {
100 fail(`Expected\n\n${actual}\n\nto match\n\n${regExp}`)
101 }
102}
103
104export function throws(thunk: () => void, error?: string | Error | ((u: unknown) => undefined), ..._: Array<never>) {
105 try {

Callers

nothing calls this directly

Calls 1

failFunction · 0.70

Tested by

no test coverage detected