mirror of
https://github.com/zadam/trilium.git
synced 2025-11-18 06:24:30 +01:00
21 lines
697 B
TypeScript
21 lines
697 B
TypeScript
import { describe, expect, it } from "vitest";
|
|
import cls from "./cls.js";
|
|
|
|
describe("Migration", () => {
|
|
it("migrates from v214", async () => {
|
|
await new Promise<void>((resolve) => {
|
|
cls.init(async () => {
|
|
await import("../app.js");
|
|
|
|
const sql = (await (import("./sql.js"))).default;
|
|
sql.rebuildIntegrationTestDatabase("spec/db/document_v214.db");
|
|
|
|
const migration = (await import("./migration.js")).default;
|
|
await migration.migrateIfNecessary();
|
|
expect(sql.getValue("SELECT count(*) FROM blobs")).toBe(116);
|
|
resolve();
|
|
});
|
|
});
|
|
});
|
|
});
|