MCPcopy Create free account
hub / github.com/6174/comflowyspace / test

Function test

apps/node/src/modules/jsondb/jsondb.test.ts:11–34  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9logger.info(getAppDataDir());
10JSONDB.dir(path.resolve(getAppDataDir(), "db"));
11async function test() {
12 // test node
13 // const base_dir = getAppDataDir();
14 // const file_path = path.resolve(base_dir, "meta.json")
15 // const metaAdapter = new JSONFile<Doc>(file_path);
16 // const metaDb = new Low(metaAdapter, {title: "haha", id: "asa", create_at: 123});
17 // await metaDb.read();
18 // await metaDb.write();
19
20 // logger.info("data", metaDb.data);
21 // await metaDb.update((db) => {
22 // db.create_at = 345
23 // })
24
25 // logger.info(file_path);
26 // await metaDb.write();
27 // if (fsExtra.existsSync(file_path)) {
28 // logger.info("file exist");
29 // } else {
30 // logger.info("file not exist");
31 // }
32
33 const db = await JSONDB.db<Doc>("workflows", ["id", "title"]);
34}
35
36test();

Callers 3

jsondb.test.tsFile · 0.85
log-parser.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected