mryanb_obsidian-asana/tests/setup.js
Ryan Bantz b425a7b952 test: add initial test suite for plugin functionality
- 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.
2025-04-29 17:03:43 -05:00

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();