Skip to content

Tests: fail on Vue warnings - #121

Merged
velis74 merged 1 commit into
mainfrom
test/fail-on-vue-warnings
Dec 2, 2026
Merged

velis74 merged 1 commit into
mainfrom
test/fail-on-vue-warnings

Conversation

@velis74

@velis74 velis74 commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Test-only change: no version bump, no changelog entry.

  • vue/test-utils/vue-warnings.ts (same helper as in vuetify-inputs): vue/test-setup.ts, now the vitest setupFiles, records every [Vue warn] and fails the test that emitted it in afterEach. A test that asserts a warning calls expectVueWarning(pattern); the matching warning is then not printed, and the test fails if no warning matches.
  • vue/test-utils/vue-warnings.spec.ts: an expected warning passes, an unexpected one and an expected one that is not emitted fail, other console warnings are ignored.
  • CI: vue/test-setup.ts added to the incremental coverage check's ignore patterns (a setupFile never appears in the coverage report).

Unit run (npx vitest run --reporter=default): 516 tests pass, 0 Vue warnings (before: 512 tests, 0 Vue warnings). A probe spec calling Vue's warn() fails with unexpected: [Vue warn]: ….

Changed existing tests: none.

test-setup.ts records every [Vue warn] and fails the test that emitted it,
unless the test allows it with expectVueWarning(pattern).
@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

✅ Incremental coverage — 100%

████████████████████ 21 / 21 changed lines covered · threshold 70% · main → test/fail-on-vue-warnings

File Coverage Covered Uncovered lines
✅ vue/test-utils/vue-warnings.ts 100% 21 / 21 —
Total 100% 21 / 21
4 files not graded (3 ignored by pattern, 1 not a source file)
File Reason
.github/workflows/ci.yml not a source file
vite.config.ts ignored by *.config.ts
vue/test-setup.ts ignored by vue/test-setup.ts
vue/test-utils/vue-warnings.spec.ts ignored by *.spec.*

Coverage reports: coverage.json (coverage.py, 76 files) · coverage/clover.xml (clover, 18 files) — incremental-coverage-check v3.1.0

@velis74
velis74 merged commit 4e2ede8 into main Dec 2, 2026
7 checks passed
@velis74
velis74 deleted the test/fail-on-vue-warnings branch December 2, 2026 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant