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

Function assertInclude

packages/vitest/src/utils.ts:137–143  ·  view source on GitHub ↗
(actual: string | undefined, expected: string, ..._: Array<never>)

Source from the content-addressed store, hash-verified

135 * @since 4.0.0
136 */
137export function assertInclude(actual: string | undefined, expected: string, ..._: Array<never>) {
138 if (typeof expected === "string") {
139 if (!actual?.includes(expected)) {
140 fail(`Expected\n\n${actual}\n\nto include\n\n${expected}`)
141 }
142 }
143}
144
145/**
146 * Asserts that `actual` matches `regExp`.

Callers

nothing calls this directly

Calls 1

failFunction · 0.70

Tested by

no test coverage detected