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.
21 lines
No EOL
594 B
JavaScript
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/'
|
|
]
|
|
};
|