MCPcopy
hub / github.com/coder/mux / createTestConn

Function createTestConn

src/node/services/analytics/queries.test.ts:34–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32}
33
34async function createTestConn(): Promise<DuckDBConnection> {
35 const instance = await DuckDBInstance.create(":memory:");
36 const conn = await instance.connect();
37 duckDbHandlesToClose.push({ instance, conn });
38
39 await conn.run(CREATE_EVENTS_TABLE_SQL);
40 await conn.run("ALTER TABLE events ADD COLUMN IF NOT EXISTS tool_name VARCHAR");
41
42 return conn;
43}
44
45async function insertEvent(conn: DuckDBConnection, seed: EventSeed): Promise<void> {
46 await conn.run(

Callers 1

queries.test.tsFile · 0.70

Calls 4

connectMethod · 0.80
createMethod · 0.65
pushMethod · 0.65
runMethod · 0.65

Tested by

no test coverage detected