Commit 8d63424
authored
Add tests (#1)
* Add comprehensive test suite with Vitest
- Set up Vitest testing framework with jsdom environment
- Add @vue/test-utils for Vue component testing
- Create comprehensive tests for debugMixin functionality
- Test plugin installation and global mixin behavior
- Add test scripts to package.json
- Mock console methods to verify debug output
- Test all log levels and configuration options
- Verify lifecycle event logging
* Fix tests to work with jsdom environment
- Configure Vite properly for jsdom test environment
- Update tests to match actual component behavior in test environment
- Fix component naming expectations (falls back to 'Anonymous' in tests)
- Test production environment behavior (no comments added)
- Test HTML comment insertion and cleanup functionality
- All 16 tests now passing
* Add GitHub Actions CI workflow
- Run tests on push to main and add-tests branches
- Test on Node.js 18.x, 20.x, and 22.x
- Run tests, build, and prettier formatting checks
- Use npm ci for faster, reliable installs
- Trigger on pull requests to main branch
* Rename actions workflow
* Run Prettier1 parent 3a02510 commit 8d63424
File tree
6 files changed
+2851
-137
lines changed- .github/workflows
- tests
6 files changed
+2851
-137
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
0 commit comments