mirror of
https://github.com/andy-stack/vaultkeeper-ai.git
synced 2026-07-22 06:42:03 +00:00
Introduce separate planning model setting to allow using different models for planning vs execution. Add visual countdown display when rate limits are hit, with improved retry delay parsing across providers (Claude, OpenAI, Gemini). Refactor settings tab into Views directory and enhance mobile layout for input controls.
27 lines
646 B
TypeScript
27 lines
646 B
TypeScript
/**
|
|
* Test setup file - runs before all tests
|
|
*/
|
|
|
|
import { afterEach, vi } from 'vitest';
|
|
|
|
// Mock global window if needed
|
|
if (typeof global.window === 'undefined') {
|
|
global.window = {} as any;
|
|
}
|
|
|
|
// Note: Component class is now defined in __mocks__/obsidian.ts
|
|
// The vitest alias in vitest.config.ts handles mocking 'obsidian' imports
|
|
|
|
// Add Obsidian's .empty() method to HTMLElement prototype for testing
|
|
if (typeof HTMLElement !== 'undefined') {
|
|
HTMLElement.prototype.empty = function() {
|
|
while (this.firstChild) {
|
|
this.removeChild(this.firstChild);
|
|
}
|
|
};
|
|
}
|
|
|
|
// Clean up after each test
|
|
afterEach(() => {
|
|
vi.clearAllMocks();
|
|
});
|