1 parent
94b5856e8d
commit
b4f503e1f1
7 files changed
+386
-171
No files matched your search
@@ -0,0 +1,12 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { QUERY_EDITOR_FULL_FEATURE_MAX_DOCUMENT_LENGTH, shouldUseQueryEditorLargeDocumentMode } from "@/lib/editor/queryEditorLargeDocument";
|
||||
|
||||
describe("query editor large document policy", () => {
|
||||
it("keeps the default feature set through the configured budget", () => {
|
||||
expect(shouldUseQueryEditorLargeDocumentMode("x".repeat(QUERY_EDITOR_FULL_FEATURE_MAX_DOCUMENT_LENGTH))).toBe(false);
|
||||
});
|
||||
|
||||
it("switches to bounded features above the configured budget", () => {
|
||||
expect(shouldUseQueryEditorLargeDocumentMode("x".repeat(QUERY_EDITOR_FULL_FEATURE_MAX_DOCUMENT_LENGTH + 1))).toBe(true);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user