MCPcopy Create free account
hub / github.com/AlexErrant/Pentive / testJoin

Function testJoin

app/tests/query2sql.test.ts:68–82  ·  view source on GitHub ↗
(
			list: Array<{
				sql: RawBuilder<SqlBool>
				name: string
			}>,
		)

Source from the content-addressed store, hash-verified

66 expect(i.i).toBe(joinsOrArgCount)
67 } else {
68 async function testJoin(
69 list: Array<{
70 sql: RawBuilder<SqlBool>
71 name: string
72 }>,
73 ) {
74 for (const x of list) {
75 const compile = x.sql.compile(ky)
76 const p = unparameterize(i, compile)
77 const expected =
78 (joinsOrArgCount as Record<string, string>)[x.name] ??
79 throwExp(x.name + " can't be null dude")
80 expect(await format(p)).toEqual(await format(expected))
81 }
82 }
83 await testJoin(converted.joinNoteValueFts)
84 await testJoin(converted.joinNoteFieldValue)
85 await testJoin(converted.joinCardTagFts)

Callers 1

assertEqualFunction · 0.85

Calls 3

throwExpFunction · 0.90
unparameterizeFunction · 0.85
formatFunction · 0.85

Tested by

no test coverage detected