@fireproof/core-test 0.0.0-smoke-1b31059-1752074105
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +232 -0
- package/blockstore/fp-envelope.test.ts-off +65 -0
- package/blockstore/fragment-gateway.test.ts-off +106 -0
- package/blockstore/interceptor-gateway.test.d.ts +19 -0
- package/blockstore/interceptor-gateway.test.js +217 -0
- package/blockstore/interceptor-gateway.test.js.map +1 -0
- package/blockstore/interceptor-gateway.test.ts +259 -0
- package/blockstore/keyed-crypto-indexeddb-file.test.d.ts +1 -0
- package/blockstore/keyed-crypto-indexeddb-file.test.js +114 -0
- package/blockstore/keyed-crypto-indexeddb-file.test.js.map +1 -0
- package/blockstore/keyed-crypto-indexeddb-file.test.ts +134 -0
- package/blockstore/keyed-crypto.test.d.ts +1 -0
- package/blockstore/keyed-crypto.test.js +310 -0
- package/blockstore/keyed-crypto.test.js.map +1 -0
- package/blockstore/keyed-crypto.test.ts +382 -0
- package/blockstore/loader.test.d.ts +1 -0
- package/blockstore/loader.test.js +241 -0
- package/blockstore/loader.test.js.map +1 -0
- package/blockstore/loader.test.ts +313 -0
- package/blockstore/standalone.test.d.ts +1 -0
- package/blockstore/standalone.test.js +112 -0
- package/blockstore/standalone.test.js.map +1 -0
- package/blockstore/standalone.test.ts +156 -0
- package/blockstore/store.test.d.ts +1 -0
- package/blockstore/store.test.js +152 -0
- package/blockstore/store.test.js.map +1 -0
- package/blockstore/store.test.ts +199 -0
- package/blockstore/transaction.test.d.ts +1 -0
- package/blockstore/transaction.test.js +109 -0
- package/blockstore/transaction.test.js.map +1 -0
- package/blockstore/transaction.test.ts +132 -0
- package/fireproof/all-gateway.test.d.ts +1 -0
- package/fireproof/all-gateway.test.js +333 -0
- package/fireproof/all-gateway.test.js.map +1 -0
- package/fireproof/all-gateway.test.ts +477 -0
- package/fireproof/attachable.test.d.ts +1 -0
- package/fireproof/attachable.test.js +438 -0
- package/fireproof/attachable.test.js.map +1 -0
- package/fireproof/attachable.test.ts +677 -0
- package/fireproof/cars/bafkreidxwt2nhvbl4fnqfw3ctlt6zbrir4kqwmjo5im6rf4q5si27kgo2i.car +0 -0
- package/fireproof/cars/bafkreidxwt2nhvbl4fnqfw3ctlt6zbrir4kqwmjo5im6rf4q5si27kgo2i.d.ts +4 -0
- package/fireproof/cars/bafkreidxwt2nhvbl4fnqfw3ctlt6zbrir4kqwmjo5im6rf4q5si27kgo2i.js +325 -0
- package/fireproof/cars/bafkreidxwt2nhvbl4fnqfw3ctlt6zbrir4kqwmjo5im6rf4q5si27kgo2i.js.map +1 -0
- package/fireproof/cars/bafkreidxwt2nhvbl4fnqfw3ctlt6zbrir4kqwmjo5im6rf4q5si27kgo2i.ts +324 -0
- package/fireproof/charwise-boolean.test.d.ts +1 -0
- package/fireproof/charwise-boolean.test.js +43 -0
- package/fireproof/charwise-boolean.test.js.map +1 -0
- package/fireproof/charwise-boolean.test.ts +68 -0
- package/fireproof/crdt.test.d.ts +1 -0
- package/fireproof/crdt.test.js +509 -0
- package/fireproof/crdt.test.js.map +1 -0
- package/fireproof/crdt.test.ts +572 -0
- package/fireproof/database.test.d.ts +1 -0
- package/fireproof/database.test.js +658 -0
- package/fireproof/database.test.js.map +1 -0
- package/fireproof/database.test.ts +772 -0
- package/fireproof/deleted-docs-handling.test.d.ts +1 -0
- package/fireproof/deleted-docs-handling.test.js +69 -0
- package/fireproof/deleted-docs-handling.test.js.map +1 -0
- package/fireproof/deleted-docs-handling.test.ts +112 -0
- package/fireproof/fireproof.test.d.ts +3 -0
- package/fireproof/fireproof.test.fixture.d.ts +15 -0
- package/fireproof/fireproof.test.fixture.js +134 -0
- package/fireproof/fireproof.test.fixture.js.map +1 -0
- package/fireproof/fireproof.test.fixture.ts +133 -0
- package/fireproof/fireproof.test.js +574 -0
- package/fireproof/fireproof.test.js.map +1 -0
- package/fireproof/fireproof.test.ts +767 -0
- package/fireproof/hello.test.d.ts +1 -0
- package/fireproof/hello.test.js +67 -0
- package/fireproof/hello.test.js.map +1 -0
- package/fireproof/hello.test.ts +75 -0
- package/fireproof/indexer.test.d.ts +1 -0
- package/fireproof/indexer.test.js +408 -0
- package/fireproof/indexer.test.js.map +1 -0
- package/fireproof/indexer.test.ts +459 -0
- package/fireproof/multiple-ledger.test.d.ts +1 -0
- package/fireproof/multiple-ledger.test.js +51 -0
- package/fireproof/multiple-ledger.test.js.map +1 -0
- package/fireproof/multiple-ledger.test.ts +67 -0
- package/fireproof/query-docs.test.d.ts +1 -0
- package/fireproof/query-docs.test.js +69 -0
- package/fireproof/query-docs.test.js.map +1 -0
- package/fireproof/query-docs.test.ts +117 -0
- package/fireproof/query-limit-issue.test.d.ts +1 -0
- package/fireproof/query-limit-issue.test.js +89 -0
- package/fireproof/query-limit-issue.test.js.map +1 -0
- package/fireproof/query-limit-issue.test.ts +147 -0
- package/fireproof/query-property-inconsistency.test.d.ts +1 -0
- package/fireproof/query-property-inconsistency.test.js +52 -0
- package/fireproof/query-property-inconsistency.test.js.map +1 -0
- package/fireproof/query-property-inconsistency.test.ts +90 -0
- package/fireproof/query-result-properties.test.d.ts +1 -0
- package/fireproof/query-result-properties.test.js +25 -0
- package/fireproof/query-result-properties.test.js.map +1 -0
- package/fireproof/query-result-properties.test.ts +43 -0
- package/fireproof/stable-cid.test.d.ts +1 -0
- package/fireproof/stable-cid.test.js +52 -0
- package/fireproof/stable-cid.test.js.map +1 -0
- package/fireproof/stable-cid.test.ts +72 -0
- package/fireproof/utils.test.d.ts +1 -0
- package/fireproof/utils.test.js +124 -0
- package/fireproof/utils.test.js.map +1 -0
- package/fireproof/utils.test.ts +137 -0
- package/gateway/file/loader-config.test.d.ts +1 -0
- package/gateway/file/loader-config.test.js +255 -0
- package/gateway/file/loader-config.test.js.map +1 -0
- package/gateway/file/loader-config.test.ts +309 -0
- package/gateway/indexeddb/loader-config.test.d.ts +1 -0
- package/gateway/indexeddb/loader-config.test.js +77 -0
- package/gateway/indexeddb/loader-config.test.js.map +1 -0
- package/gateway/indexeddb/loader-config.test.ts +80 -0
- package/global-setup.d.ts +2 -0
- package/global-setup.js +9 -0
- package/global-setup.js.map +1 -0
- package/global-setup.ts +11 -0
- package/helpers.d.ts +31 -0
- package/helpers.js +140 -0
- package/helpers.js.map +1 -0
- package/helpers.ts +177 -0
- package/package.json +75 -0
- package/protocols/cloud/msger.test.d.ts +1 -0
- package/protocols/cloud/msger.test.js +464 -0
- package/protocols/cloud/msger.test.js.map +1 -0
- package/protocols/cloud/msger.test.ts +559 -0
- package/runtime/fp-envelope-serialize.test.d.ts +1 -0
- package/runtime/fp-envelope-serialize.test.js +223 -0
- package/runtime/fp-envelope-serialize.test.js.map +1 -0
- package/runtime/fp-envelope-serialize.test.ts +266 -0
- package/runtime/meta-key-hack.test.d.ts +1 -0
- package/runtime/meta-key-hack.test.js +85 -0
- package/runtime/meta-key-hack.test.js.map +1 -0
- package/runtime/meta-key-hack.test.ts +103 -0
- package/setup.file.d.ts +1 -0
- package/setup.file.js +3 -0
- package/setup.file.js.map +1 -0
- package/setup.file.ts +1 -0
- package/setup.indexeddb.d.ts +1 -0
- package/setup.indexeddb.js +2 -0
- package/setup.indexeddb.js.map +1 -0
- package/setup.indexeddb.ts +0 -0
- package/setup.memory.d.ts +1 -0
- package/setup.memory.js +4 -0
- package/setup.memory.js.map +1 -0
- package/setup.memory.ts +2 -0
- package/tsconfig.json +18 -0
- package/vitest.config.d.ts +2 -0
- package/vitest.config.js +8 -0
- package/vitest.config.js.map +1 -0
- package/vitest.config.ts +8 -0
- package/vitest.file.config.d.ts +2 -0
- package/vitest.file.config.js +11 -0
- package/vitest.file.config.js.map +1 -0
- package/vitest.file.config.ts +11 -0
- package/vitest.indexeddb.config.d.ts +2 -0
- package/vitest.indexeddb.config.js +21 -0
- package/vitest.indexeddb.config.js.map +1 -0
- package/vitest.indexeddb.config.ts +34 -0
- package/vitest.memory.config.d.ts +2 -0
- package/vitest.memory.config.js +24 -0
- package/vitest.memory.config.js.map +1 -0
- package/vitest.memory.config.ts +24 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { BuildURI, URI } from "@adviser/cement";
|
|
2
|
+
import { fireproof } from "@fireproof/core-base";
|
|
3
|
+
import { registerStoreProtocol } from "@fireproof/core-blockstore";
|
|
4
|
+
import { MemoryGateway } from "@fireproof/core-gateways-memory";
|
|
5
|
+
import { DbMetaEvent, Loadable, V2SerializedMetaKey } from "@fireproof/core-types-blockstore";
|
|
6
|
+
import { AddKeyToDbMetaGateway } from "@fireproof/core-gateways-base";
|
|
7
|
+
import { beforeAll, describe, expect, it, vitest } from "vitest";
|
|
8
|
+
import { KeyBag } from "@fireproof/core-keybag";
|
|
9
|
+
import { ensureSuperThis } from "@fireproof/core-runtime";
|
|
10
|
+
import { Database, PARAM } from "@fireproof/core-types-base";
|
|
11
|
+
|
|
12
|
+
describe("MetaKeyHack", () => {
|
|
13
|
+
const storageMap = new Map();
|
|
14
|
+
|
|
15
|
+
const sthis = ensureSuperThis();
|
|
16
|
+
const memGw = new MemoryGateway(sthis, storageMap);
|
|
17
|
+
registerStoreProtocol({
|
|
18
|
+
protocol: "hack:",
|
|
19
|
+
defaultURI: () => URI.from(`hack://localhost?version=hack`),
|
|
20
|
+
serdegateway: async () => {
|
|
21
|
+
return new AddKeyToDbMetaGateway(memGw, "v2");
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
let db: Database;
|
|
26
|
+
let ctx: { loader: Loadable };
|
|
27
|
+
beforeAll(async () => {
|
|
28
|
+
db = fireproof("test", {
|
|
29
|
+
storeUrls: {
|
|
30
|
+
base: BuildURI.from("hack://localhost").setParam(PARAM.SELF_REFLECT, "x"),
|
|
31
|
+
},
|
|
32
|
+
keyBag: {
|
|
33
|
+
url: "memory://./dist/kb-dir-partykit?extractKey=_deprecated_internal_api",
|
|
34
|
+
},
|
|
35
|
+
});
|
|
36
|
+
await db.ready();
|
|
37
|
+
ctx = { loader: db.ledger.crdt.blockstore.loader };
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
it("inject key into meta", async () => {
|
|
41
|
+
const loader = db.ledger.crdt.blockstore.loader;
|
|
42
|
+
const metaStore = loader.attachedStores.local().active.meta;
|
|
43
|
+
const subscribeFn = vitest.fn();
|
|
44
|
+
const unreg = await metaStore.realGateway.subscribe(
|
|
45
|
+
ctx,
|
|
46
|
+
metaStore.url(),
|
|
47
|
+
// metaStore.url().build().setParam(PARAM.SELF_REFLECT, "x").URI(),
|
|
48
|
+
subscribeFn,
|
|
49
|
+
);
|
|
50
|
+
expect(unreg.isOk()).toBeTruthy();
|
|
51
|
+
await db.put({ val: "test" });
|
|
52
|
+
|
|
53
|
+
const dataStore = loader.attachedStores.local().active.car;
|
|
54
|
+
const kb = new KeyBag(db.ledger.opts.keyBag);
|
|
55
|
+
const rDataStoreKeyItem = await kb.getNamedKey(dataStore.url().getParam(PARAM.STORE_KEY) ?? "");
|
|
56
|
+
|
|
57
|
+
await rDataStoreKeyItem.Ok().upsert("zBUFMmu5c3VdCa4r2DZTzhR", false);
|
|
58
|
+
await rDataStoreKeyItem.Ok().upsert("zH1fyizirAiYVxoaQ2XZ3Xj", false);
|
|
59
|
+
|
|
60
|
+
expect(rDataStoreKeyItem.isOk()).toBeTruthy();
|
|
61
|
+
const rUrl = await memGw.buildUrl(metaStore.url(), "main");
|
|
62
|
+
// console.log(">>>>", rUrl.Ok().toString())
|
|
63
|
+
const rGet = await memGw.get(rUrl.Ok(), sthis);
|
|
64
|
+
const metas = JSON.parse(ctx.loader.sthis.txt.decode(rGet.Ok())) as V2SerializedMetaKey;
|
|
65
|
+
const keyMaterials = metas.keys;
|
|
66
|
+
const dataStoreKeyMaterial = await rDataStoreKeyItem.Ok().asKeysItem();
|
|
67
|
+
expect(keyMaterials.length).toBeGreaterThan(0);
|
|
68
|
+
expect(dataStoreKeyMaterial).toEqual({
|
|
69
|
+
keys: {
|
|
70
|
+
...(await rDataStoreKeyItem
|
|
71
|
+
.Ok()
|
|
72
|
+
.get()
|
|
73
|
+
.then(async (r) => ({
|
|
74
|
+
[r?.fingerPrint as string]: {
|
|
75
|
+
default: true,
|
|
76
|
+
fingerPrint: r?.fingerPrint,
|
|
77
|
+
key: await r?.extract().then((i) => i.keyStr),
|
|
78
|
+
},
|
|
79
|
+
}))),
|
|
80
|
+
z3boMcLEQxjZAMrVo2j3k9bZJzmSqXkQmh6q7bLZ2nRuo: {
|
|
81
|
+
default: false,
|
|
82
|
+
fingerPrint: "z3boMcLEQxjZAMrVo2j3k9bZJzmSqXkQmh6q7bLZ2nRuo",
|
|
83
|
+
key: "zH1fyizirAiYVxoaQ2XZ3Xj",
|
|
84
|
+
},
|
|
85
|
+
zG5F2VWVAs3uAFyLE5rty5WWo7zJ1oBmYTdnraxfhaHG5: {
|
|
86
|
+
default: false,
|
|
87
|
+
fingerPrint: "zG5F2VWVAs3uAFyLE5rty5WWo7zJ1oBmYTdnraxfhaHG5",
|
|
88
|
+
key: "zBUFMmu5c3VdCa4r2DZTzhR",
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
name: "@test-data@",
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
// expect(keyMaterials.every((k) => k === dataStoreKeyMaterial.keyStr)).toBeTruthy()
|
|
95
|
+
// expect(subscribeFn.mock.calls).toEqual([]);
|
|
96
|
+
expect(subscribeFn).toHaveBeenCalledTimes(2);
|
|
97
|
+
const addKeyToDbMetaGateway = metaStore.realGateway as AddKeyToDbMetaGateway;
|
|
98
|
+
expect(
|
|
99
|
+
subscribeFn.mock.calls.map((i) => i.map((i) => i.payload.map((i: DbMetaEvent) => i.eventCid.toString()))).flat(2),
|
|
100
|
+
).toEqual(Array.from(new Set(addKeyToDbMetaGateway.lastDecodedMetas.map((i) => i.metas.map((i) => i.cid)).flat(2))));
|
|
101
|
+
unreg.Ok()();
|
|
102
|
+
});
|
|
103
|
+
});
|
package/setup.file.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/setup.file.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup.file.js","sourceRoot":"","sources":["setup.file.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,GAAG,CAAC,cAAc,GAAG,oBAAoB,CAAC"}
|
package/setup.file.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
process.env.FP_STORAGE_URL = "./dist/fp-dir-file";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup.indexeddb.js","sourceRoot":"","sources":["setup.indexeddb.ts"],"names":[],"mappings":""}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/setup.memory.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup.memory.js","sourceRoot":"","sources":["setup.memory.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,GAAG,CAAC,cAAc,GAAG,eAAe,CAAC;AAC7C,OAAO,CAAC,GAAG,CAAC,aAAa,GAAG,iBAAiB,CAAC"}
|
package/setup.memory.ts
ADDED
package/tsconfig.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": [
|
|
3
|
+
"/home/runner/work/fireproof/fireproof/tsconfig.dist.json"
|
|
4
|
+
],
|
|
5
|
+
"compilerOptions": {
|
|
6
|
+
"noEmit": false,
|
|
7
|
+
"outDir": "./"
|
|
8
|
+
},
|
|
9
|
+
"include": [
|
|
10
|
+
"**/*"
|
|
11
|
+
],
|
|
12
|
+
"exclude": [
|
|
13
|
+
"node_modules",
|
|
14
|
+
"dist",
|
|
15
|
+
".git",
|
|
16
|
+
".vscode"
|
|
17
|
+
]
|
|
18
|
+
}
|
package/vitest.config.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { defineConfig } from "vitest/config";
|
|
2
|
+
export default defineConfig({
|
|
3
|
+
test: {
|
|
4
|
+
projects: ["vitest.file.config.ts", "vitest.memory.config.ts", "vitest.indexeddb.config.ts"],
|
|
5
|
+
globalSetup: "global-setup.ts",
|
|
6
|
+
},
|
|
7
|
+
});
|
|
8
|
+
//# sourceMappingURL=vitest.config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vitest.config.js","sourceRoot":"","sources":["vitest.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,eAAe,YAAY,CAAC;IAC1B,IAAI,EAAE;QACJ,QAAQ,EAAE,CAAC,uBAAuB,EAAE,yBAAyB,EAAE,4BAA4B,CAAC;QAC5F,WAAW,EAAE,iBAAiB;KAC/B;CACF,CAAC,CAAC"}
|
package/vitest.config.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { defineConfig } from "vitest/config";
|
|
2
|
+
export default defineConfig({
|
|
3
|
+
test: {
|
|
4
|
+
name: "core:file",
|
|
5
|
+
exclude: ["dist/**", "node_modules/**", "react/**", "examples/**", "gateway/indexeddb"],
|
|
6
|
+
include: ["**/*test.?(c|m)[jt]s?(x)"],
|
|
7
|
+
globals: true,
|
|
8
|
+
setupFiles: "./setup.file.ts",
|
|
9
|
+
},
|
|
10
|
+
});
|
|
11
|
+
//# sourceMappingURL=vitest.file.config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vitest.file.config.js","sourceRoot":"","sources":["vitest.file.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,eAAe,YAAY,CAAC;IAC1B,IAAI,EAAE;QACJ,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE,CAAC,SAAS,EAAE,iBAAiB,EAAE,UAAU,EAAE,aAAa,EAAE,mBAAmB,CAAC;QACvF,OAAO,EAAE,CAAC,0BAA0B,CAAC;QACrC,OAAO,EAAE,IAAI;QACb,UAAU,EAAE,iBAAiB;KAC9B;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { defineConfig } from "vitest/config";
|
|
2
|
+
|
|
3
|
+
export default defineConfig({
|
|
4
|
+
test: {
|
|
5
|
+
name: "core:file",
|
|
6
|
+
exclude: ["dist/**", "node_modules/**", "react/**", "examples/**", "gateway/indexeddb"],
|
|
7
|
+
include: ["**/*test.?(c|m)[jt]s?(x)"],
|
|
8
|
+
globals: true,
|
|
9
|
+
setupFiles: "./setup.file.ts",
|
|
10
|
+
},
|
|
11
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { defineConfig } from "vitest/config";
|
|
2
|
+
export default defineConfig({
|
|
3
|
+
test: {
|
|
4
|
+
name: "indexeddb",
|
|
5
|
+
exclude: ["dist/**", "node_modules/**", "examples/**", "gateway/file"],
|
|
6
|
+
include: ["**/*test.?(c|m)[jt]s?(x)"],
|
|
7
|
+
browser: {
|
|
8
|
+
enabled: true,
|
|
9
|
+
headless: true,
|
|
10
|
+
provider: "playwright",
|
|
11
|
+
instances: [
|
|
12
|
+
{
|
|
13
|
+
browser: "chromium",
|
|
14
|
+
},
|
|
15
|
+
],
|
|
16
|
+
},
|
|
17
|
+
globals: true,
|
|
18
|
+
setupFiles: "./setup.indexeddb.ts",
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
//# sourceMappingURL=vitest.indexeddb.config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vitest.indexeddb.config.js","sourceRoot":"","sources":["vitest.indexeddb.config.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,eAAe,YAAY,CAAC;IAC1B,IAAI,EAAE;QACJ,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE,CAAC,SAAS,EAAE,iBAAiB,EAAE,aAAa,EAAE,cAAc,CAAC;QACtE,OAAO,EAAE,CAAC,0BAA0B,CAAC;QACrC,OAAO,EAAE;YACP,OAAO,EAAE,IAAI;YACb,QAAQ,EAAE,IAAI;YACd,QAAQ,EAAE,YAAY;YAGtB,SAAS,EAAE;gBACT;oBACE,OAAO,EAAE,UAAU;iBAEpB;aACF;SAQF;QACD,OAAO,EAAE,IAAI;QACb,UAAU,EAAE,sBAAsB;KACnC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/// <reference types="@vitest/browser/providers/playwright" />
|
|
2
|
+
/// <reference types="@vitest/browser/providers/webdriverio" />
|
|
3
|
+
|
|
4
|
+
import { defineConfig } from "vitest/config";
|
|
5
|
+
|
|
6
|
+
export default defineConfig({
|
|
7
|
+
test: {
|
|
8
|
+
name: "indexeddb",
|
|
9
|
+
exclude: ["dist/**", "node_modules/**", "examples/**", "gateway/file"],
|
|
10
|
+
include: ["**/*test.?(c|m)[jt]s?(x)"],
|
|
11
|
+
browser: {
|
|
12
|
+
enabled: true,
|
|
13
|
+
headless: true,
|
|
14
|
+
provider: "playwright",
|
|
15
|
+
// provider: "webdriverio",
|
|
16
|
+
// name: "chrome",
|
|
17
|
+
instances: [
|
|
18
|
+
{
|
|
19
|
+
browser: "chromium",
|
|
20
|
+
//setupFile: './chromium-setup.js',
|
|
21
|
+
},
|
|
22
|
+
],
|
|
23
|
+
|
|
24
|
+
// name: process.env.FP_BROWSER || "chrome", // browser name is required
|
|
25
|
+
// instances: [
|
|
26
|
+
// {
|
|
27
|
+
// browser: process.env.FP_BROWSER || "chrome", // browser name is required
|
|
28
|
+
// },
|
|
29
|
+
// ],
|
|
30
|
+
},
|
|
31
|
+
globals: true,
|
|
32
|
+
setupFiles: "./setup.indexeddb.ts",
|
|
33
|
+
},
|
|
34
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { defineConfig } from "vitest/config";
|
|
2
|
+
export default defineConfig({
|
|
3
|
+
test: {
|
|
4
|
+
name: "memory",
|
|
5
|
+
exclude: [
|
|
6
|
+
"dist/**",
|
|
7
|
+
"node_modules/**",
|
|
8
|
+
"react/**",
|
|
9
|
+
"**/smoke/**",
|
|
10
|
+
"**/scripts/**",
|
|
11
|
+
"**/examples/**",
|
|
12
|
+
"gateway/indexeddb",
|
|
13
|
+
"gateway/file",
|
|
14
|
+
"blockstore/keyed-crypto-indexeddb-file.test.ts",
|
|
15
|
+
],
|
|
16
|
+
include: ["**/*test.?(c|m)[jt]s?(x)"],
|
|
17
|
+
coverage: {
|
|
18
|
+
exclude: ["**/smoke/**", "**/scripts/**", "**/examples/**"],
|
|
19
|
+
},
|
|
20
|
+
globals: true,
|
|
21
|
+
setupFiles: "./setup.memory.ts",
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
//# sourceMappingURL=vitest.memory.config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vitest.memory.config.js","sourceRoot":"","sources":["vitest.memory.config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,eAAe,YAAY,CAAC;IAC1B,IAAI,EAAE;QACJ,IAAI,EAAE,QAAQ;QACd,OAAO,EAAE;YACP,SAAS;YACT,iBAAiB;YACjB,UAAU;YACV,aAAa;YACb,eAAe;YACf,gBAAgB;YAChB,mBAAmB;YACnB,cAAc;YACd,gDAAgD;SACjD;QACD,OAAO,EAAE,CAAC,0BAA0B,CAAC;QACrC,QAAQ,EAAE;YACR,OAAO,EAAE,CAAC,aAAa,EAAE,eAAe,EAAE,gBAAgB,CAAC;SAC5D;QACD,OAAO,EAAE,IAAI;QACb,UAAU,EAAE,mBAAmB;KAChC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { defineConfig } from "vitest/config";
|
|
2
|
+
|
|
3
|
+
export default defineConfig({
|
|
4
|
+
test: {
|
|
5
|
+
name: "memory",
|
|
6
|
+
exclude: [
|
|
7
|
+
"dist/**",
|
|
8
|
+
"node_modules/**",
|
|
9
|
+
"react/**",
|
|
10
|
+
"**/smoke/**",
|
|
11
|
+
"**/scripts/**",
|
|
12
|
+
"**/examples/**",
|
|
13
|
+
"gateway/indexeddb",
|
|
14
|
+
"gateway/file",
|
|
15
|
+
"blockstore/keyed-crypto-indexeddb-file.test.ts",
|
|
16
|
+
],
|
|
17
|
+
include: ["**/*test.?(c|m)[jt]s?(x)"],
|
|
18
|
+
coverage: {
|
|
19
|
+
exclude: ["**/smoke/**", "**/scripts/**", "**/examples/**"],
|
|
20
|
+
},
|
|
21
|
+
globals: true,
|
|
22
|
+
setupFiles: "./setup.memory.ts",
|
|
23
|
+
},
|
|
24
|
+
});
|