MCPcopy Create free account
hub / github.com/TanStack/db / toContain

Function toContain

packages/tauri-db-sqlite-persistence/e2e/app/src/runtime-vitest.ts:249–261  ·  view source on GitHub ↗
(expected: unknown)

Source from the content-addressed store, hash-verified

247 )
248 },
249 toContain(expected: unknown) {
250 const contains =
251 typeof actual === `string`
252 ? actual.includes(String(expected))
253 : Array.isArray(actual)
254 ? actual.some((entry) => deepEqual(entry, expected))
255 : false
256
257 assert(
258 contains,
259 `Expected ${formatValue(actual)} ${negate ? `not ` : ``}to contain ${formatValue(expected)}`,
260 )
261 },
262 toHaveProperty(propertyKey: string) {
263 const hasProperty =
264 isObjectLike(actual) &&

Callers

nothing calls this directly

Calls 3

deepEqualFunction · 0.70
assertFunction · 0.70
formatValueFunction · 0.70

Tested by

no test coverage detected