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

Function createExpectedResults

packages/db-ivm/tests/test-utils.ts:97–104  ·  view source on GitHub ↗
(items: Array<T>)

Source from the content-addressed store, hash-verified

95 * Create expected result set as a Map
96 */
97export function createExpectedResults<T>(items: Array<T>): Map<string, T> {
98 const map = new Map<string, T>()
99 for (const item of items) {
100 const key = JSON.stringify(item)
101 map.set(key, item)
102 }
103 return map
104}
105
106/**
107 * Test helper that tracks messages and materializes results

Callers 1

assertResultsFunction · 0.85

Calls 1

setMethod · 0.45

Tested by

no test coverage detected