mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-21 05:59:35 +01:00
core: fix lookup tests
This commit is contained in:
@@ -32,6 +32,7 @@ import { getId } from "../../src/utils/id.js";
|
|||||||
import { existsSync, mkdirSync } from "fs";
|
import { existsSync, mkdirSync } from "fs";
|
||||||
import * as betterTrigram from "sqlite-better-trigram";
|
import * as betterTrigram from "sqlite-better-trigram";
|
||||||
import * as fts5Html from "sqlite3-fts5-html";
|
import * as fts5Html from "sqlite3-fts5-html";
|
||||||
|
import { getLoadablePath } from "sqlite-regex";
|
||||||
|
|
||||||
const TEST_NOTEBOOK: Partial<Notebook> = {
|
const TEST_NOTEBOOK: Partial<Notebook> = {
|
||||||
title: "Test Notebook",
|
title: "Test Notebook",
|
||||||
@@ -67,6 +68,7 @@ function databaseTest(type: "memory" | "persistent" = "memory") {
|
|||||||
});
|
});
|
||||||
betterTrigram.load(betterSqliteDb);
|
betterTrigram.load(betterSqliteDb);
|
||||||
fts5Html.load(betterSqliteDb);
|
fts5Html.load(betterSqliteDb);
|
||||||
|
betterSqliteDb.loadExtension(getLoadablePath());
|
||||||
return db.init().then(() => db);
|
return db.init().then(() => db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user