mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-29 19:12:27 +08:00
fix(test/server): one more failing test
This commit is contained in:
parent
4976033c16
commit
6aaacd6ca1
@ -1,13 +1,16 @@
|
|||||||
import { describe, expect, it } from "vitest";
|
import { describe, expect, it } from "vitest";
|
||||||
import sql from "./sql.js";
|
|
||||||
import migration from "./migration.js";
|
|
||||||
import cls from "./cls.js";
|
import cls from "./cls.js";
|
||||||
|
|
||||||
describe("Migration", () => {
|
describe("Migration", () => {
|
||||||
it("migrates from v214", async () => {
|
it("migrates from v214", async () => {
|
||||||
await new Promise<void>((resolve) => {
|
await new Promise<void>((resolve) => {
|
||||||
cls.init(async () => {
|
cls.init(async () => {
|
||||||
|
await import("../app.js");
|
||||||
|
|
||||||
|
const sql = (await (import("./sql.js"))).default;
|
||||||
sql.rebuildIntegrationTestDatabase("spec/db/document_v214.db");
|
sql.rebuildIntegrationTestDatabase("spec/db/document_v214.db");
|
||||||
|
|
||||||
|
const migration = (await import("./migration.js")).default;
|
||||||
await migration.migrateIfNecessary();
|
await migration.migrateIfNecessary();
|
||||||
expect(sql.getValue("SELECT count(*) FROM blobs")).toBe(116);
|
expect(sql.getValue("SELECT count(*) FROM blobs")).toBe(116);
|
||||||
resolve();
|
resolve();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user