test: drop source-text assertion tests and merge locale checks

This commit is contained in:
t8y2 committed 2026-09-23 22:10:06 +08:00
1 parent 349d77d180
commit 8897e12714
257 files changed
+166 -12815

No files matched your search

-9
View File
@@ -1,5 +1,4 @@
import assert from "node:assert/strict";
import { readFileSync } from "node:fs";
import { beforeEach, test, vi } from "vitest";
const { beginDatabaseBackupSnapshot, exportDatabaseSql, rollbackManualTransaction } = vi.hoisted(() => ({
@@ -55,14 +54,6 @@ test("database export waits for terminal progress before releasing its snapshot"
assert.equal((await operation).status, "Done");
});
test("single database export holds its snapshot until terminal progress", () => {
const source = readFileSync("apps/desktop/src/components/export/DatabaseExportDialog.vue", "utf8");
const singleExport = source.slice(source.indexOf("async function startExport()"), source.indexOf("async function startAllDatabasesExport()"));
assert.match(singleExport, /return runDatabaseExportUntilTerminal\(request,/);
assert.doesNotMatch(singleExport, /await api\.exportDatabaseSql\(request,/);
});
test("database export snapshot is released after success", async () => {
const operation = vi.fn(async (sessionId: string | undefined) => `done:${sessionId}`);