mryanb_obsidian-asana/jest.config.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

21 lines
No EOL
594 B
JavaScript

module.exports = {
testEnvironment: 'node',
transform: {
'^.+\\.tsx?$': ['ts-jest', {
tsconfig: 'tsconfig.json'
}]
},
testRegex: '(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$',
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
moduleNameMapper: {
'^obsidian$': '<rootDir>/tests/__mocks__/obsidian.js'
},
setupFiles: ['<rootDir>/tests/setup.js'],
transformIgnorePatterns: [
'node_modules/(?!(obsidian)/)'
],
testPathIgnorePatterns: [
'/node_modules/',
'/dist/'
]
};