mirror of
https://github.com/zadam/trilium.git
synced 2026-05-07 00:36:59 +02:00
test(core): fix more tests
This commit is contained in:
@@ -20,12 +20,13 @@ process.env.TRILIUM_PUBLIC_SERVER = "http://localhost:4200";
|
||||
|
||||
beforeAll(async () => {
|
||||
// Load the integration test database into memory. The fixture at
|
||||
// spec/db/document.db is pre-seeded with the schema, demo content, and
|
||||
// a known password ("demo1234") that the ETAPI tests log in with. Each
|
||||
// test file runs in its own vitest fork (pool: "forks"), so each gets a
|
||||
// fresh in-memory copy and mutations don't leak across files.
|
||||
// packages/trilium-core/src/test/fixtures/document.db is pre-seeded with
|
||||
// the schema, demo content, and a known password ("demo1234") that the
|
||||
// ETAPI tests log in with. Each test file runs in its own vitest fork
|
||||
// (pool: "forks"), so each gets a fresh in-memory copy and mutations
|
||||
// don't leak across files.
|
||||
const dbProvider = new BetterSqlite3Provider();
|
||||
dbProvider.loadFromBuffer(readFileSync(join(__dirname, "db", "document.db")));
|
||||
dbProvider.loadFromBuffer(readFileSync(require.resolve("@triliumnext/core/src/test/fixtures/document.db")));
|
||||
|
||||
await initializeCore({
|
||||
dbConfig: {
|
||||
|
||||
Reference in New Issue
Block a user