Skip to content

Commit ad601c4

Browse files
authored
Merge pull request #183 from cloud-atlas-ai/issue181
Fix #181 (and add regression suite)
2 parents 32cb72b + 408be92 commit ad601c4

File tree

10 files changed

+5988
-1202
lines changed

10 files changed

+5988
-1202
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,3 +139,17 @@ If for some reason you want to install the plugin manually:
139139
4. `npm run dev` will watch for changes and build the plugin to `dist/main.js`.
140140
5. copy the `dist/main.js` (or `dist/main-debug.js` if you want the un-minified version) to your Obdisian vault plugin folder (`cp dist/main.js <vault>/.obsidian/plugins/ics/main.js`).
141141
6. Reload the vault or use the [Hot Reload Plugin](https://github.com/pjeby/hot-reload).
142+
143+
### Testing
144+
145+
The plugin includes a test harness for recurring events and timezone handling to prevent regressions:
146+
147+
```bash
148+
# Run all tests
149+
npm test
150+
151+
# Run tests in watch mode (automatically re-runs when files change)
152+
npm run test:watch
153+
```
154+
155+
See `tests/README.md` for information about how to add new tests.

jest.config.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module.exports = {
2+
preset: 'ts-jest',
3+
testEnvironment: 'node',
4+
roots: ['<rootDir>/src', '<rootDir>/tests'],
5+
testMatch: [
6+
'**/__tests__/**/*.ts',
7+
'**/?(*.)+(spec|test).ts'
8+
],
9+
transform: {
10+
'^.+\\.ts$': 'ts-jest',
11+
},
12+
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
13+
collectCoverageFrom: [
14+
'src/**/*.ts',
15+
'!src/**/*.d.ts',
16+
],
17+
setupFilesAfterEnv: ['<rootDir>/tests/setup.ts']
18+
};

0 commit comments

Comments
 (0)