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

Function assertInclude

packages/bun-test-effect/src/utils.ts:120–126  ·  view source on GitHub ↗
(actual: string | undefined, expected: string, ..._: Array<never>)

Source from the content-addressed store, hash-verified

118 * @since 0.21.0
119 */
120export function assertInclude(actual: string | undefined, expected: string, ..._: Array<never>) {
121 if (Predicate.isString(expected)) {
122 if (!actual?.includes(expected)) {
123 fail(`Expected\n\n${actual}\n\nto include\n\n${expected}`);
124 }
125 }
126}
127
128/**
129 * Asserts that `actual` matches `regexp`.

Callers

nothing calls this directly

Calls 1

failFunction · 0.85

Tested by

no test coverage detected