Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

test: clean up settings and chat fixtures before teardown (#7324)

LearningCircuit69fe014ce549
diff --git a/tests/js/components/chat-migration-runtime.test.js b/tests/js/components/chat-migration-runtime.test.js
index 4e21f1e726..ba96245ab6 100644
--- a/tests/js/components/chat-migration-runtime.test.js
+++ b/tests/js/components/chat-migration-runtime.test.js
@@ -141,6 +141,7 @@ beforeEach(() => {
});
afterEach(() => {
+ window.chatComponent?.startNewChat();
vi.restoreAllMocks();
vi.useRealTimers();
document.head.replaceChildren();
diff --git a/tests/js/components/settings-empty-provider-tabs.test.js b/tests/js/components/settings-empty-provider-tabs.test.js
index 57754b8e26..96757387a5 100644
--- a/tests/js/components/settings-empty-provider-tabs.test.js
+++ b/tests/js/components/settings-empty-provider-tabs.test.js
@@ -48,9 +48,14 @@ function setting(overrides) {
beforeEach(() => {
vi.resetModules();
+ // Keep delayed component work within this test's DOM lifetime.
+ vi.useFakeTimers();
+ vi.spyOn(document, 'readyState', 'get').mockReturnValue('complete');
});
afterEach(() => {
+ vi.clearAllTimers();
+ vi.useRealTimers();
vi.restoreAllMocks();
vi.unstubAllGlobals();
delete window.ui;