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

Function assertInclude

packages/effect/test/utils/assert.ts:90–96  ·  view source on GitHub ↗
(actual: string | undefined, expected: string, ..._: Array<never>)

Source from the content-addressed store, hash-verified

88}
89
90export function assertInclude(actual: string | undefined, expected: string, ..._: Array<never>) {
91 if (Predicate.isString(expected)) {
92 if (!actual?.includes(expected)) {
93 fail(`Expected\n\n${actual}\n\nto include\n\n${expected}`)
94 }
95 }
96}
97
98export function assertMatch(actual: string, regExp: RegExp, ..._: Array<never>) {
99 if (!regExp.test(actual)) {

Calls 1

failFunction · 0.70

Tested by 1