mirror of
https://github.com/mryanb/obsidian-asana.git
synced 2026-07-22 05:38:24 +00:00
- Add Jest configuration and TypeScript support - Create tests for main plugin functionality (initialization, settings) - Add tests for Asana API integration (workspaces, projects, tasks) - Set up mock files for Obsidian API and test environment - Add test scripts to package.json This commit sets up a basic test infrastructure to ensure the plugin's core functionality works as expected and to catch potential regressions in future changes.
16 lines
No EOL
362 B
JavaScript
16 lines
No EOL
362 B
JavaScript
// Mock the global window object
|
|
global.window = {
|
|
document: {
|
|
createElement: jest.fn(),
|
|
createDocumentFragment: jest.fn()
|
|
}
|
|
};
|
|
|
|
// Mock the global document object
|
|
global.document = {
|
|
createElement: jest.fn(),
|
|
createDocumentFragment: jest.fn()
|
|
};
|
|
|
|
// Mock console.error to prevent test output pollution
|
|
console.error = jest.fn();
|