-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test coverage for plugin functionality #15
Comments
Test technology to useFor unit tests I consider to use Test runner | Node.js v21.7.3 Documentation. Links |
For unit testing I use node native test runner
I discovered that Native Test Runner doesn't provide check test coverage for all project, just only for used files in tests. |
I discovered that I can get report from all project by using c8: bcoe/c8: output coverage reports using Node.js' built in coverage Edit: But I have an issue using it with typescript, I use // in scripts
"test": "node --import tsx --test tests/**/*.ts",
"test:coverage": "c8 pnpm test". And run pnpm test:coverage I'm almost there but the problem is that it shows full code coverage, but that's wrong! // Added `--experimental-test-coverage`
"test": "node --import tsx --experimental-test-coverage --test tests/**/*.ts", And run pnpm test |
I followed the advice from this comment and downgrade version |
Now I want to add some e2e tests, |
I installed webdriverio and attempt to run an example test but there are conflict between chromedirvers 124 (from electron or webdriverio) and 120 from obsidian. I installed 120 version of chromedriver from here. But I cannot figure out how to proper set up it inside capabilities in wdio.conf.ts. |
I currently don't plan to add e2e functionality to this plugin. So I close this issue. |
It will be good insight to add tests, because releasing everytime when found new bug and trying to review all code to find bug before releasing is overwhelming.
So this issue is dedicated to search good test framework and list of tests for plugin.
The text was updated successfully, but these errors were encountered: