test: drop source-text assertion tests and merge locale checks
This commit is contained in:
1 parent
349d77d180
commit
8897e12714
257 files changed
+166
-12815
No files matched your search
@@ -1,5 +1,4 @@
|
||||
import { strict as assert } from "node:assert";
|
||||
import { readFileSync } from "node:fs";
|
||||
import { test } from "vitest";
|
||||
import { buildMongoSyntaxDiagnostics, shouldRunMongoDiagnostics } from "../../apps/desktop/src/lib/mongo/mongoSyntaxDiagnostics";
|
||||
|
||||
@@ -122,9 +121,4 @@ test("keeps completed diagnostics while the cursor is in an unfinished command",
|
||||
|
||||
const unfinished = underlined(source, 0).find((diagnostic) => diagnostic.severity === "error");
|
||||
assert.match(unfinished!.message, /unclosed/i);
|
||||
|
||||
const diagnosticsSource = readFileSync("apps/desktop/src/components/editor/useQueryEditorDiagnostics.ts", "utf8");
|
||||
const mongoBranch = diagnosticsSource.slice(diagnosticsSource.indexOf('if (props.databaseType === "mongodb")'), diagnosticsSource.indexOf('if (props.databaseType === "redis")'));
|
||||
assert.doesNotMatch(mongoBranch, /shouldRunMongoDiagnostics/);
|
||||
assert.match(mongoBranch, /setSemanticDiagnostics\(buildMongoSyntaxDiagnostics\(sql, cursor\)\)/);
|
||||
});
|
||||
Reference in new issue
Block a user