MCPcopy
hub / github.com/hcengineering/platform / getModelDb

Function getModelDb

pods/server/src/__tests__/server.test.ts:51–62  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

49 const port = 10000
50 const handler = new RPCHandler()
51 async function getModelDb (): Promise<{ modelDb: ModelDb, hierarchy: Hierarchy }> {
52 const txes = genMinModel()
53 const hierarchy = new Hierarchy()
54 for (const tx of txes) {
55 hierarchy.tx(tx)
56 }
57 const modelDb = new ModelDb(hierarchy)
58 for (const tx of txes) {
59 await modelDb.tx(tx)
60 }
61 return { modelDb, hierarchy }
62 }
63
64 const toolCtx = new MeasureMetricsContext('test', {})
65 const opt: SessionManagerOptions = {

Callers 1

server.test.tsFile · 0.85

Calls 3

txMethod · 0.95
genMinModelFunction · 0.90
txMethod · 0.45

Tested by

no test coverage detected