fix(test): replace meaningless assertions and silent skips with proper test semantics

- Replace 4x expect(true).toBe(true) in audit-logger.test.ts with
  applyAuditConfig() + app.getVersion call count assertions
- Replace if(!hasCredentials){return} pattern with it.skipIf() in
  3 integration test files (cleaner, erp-auth, extractor) so Vitest
  correctly reports 12 tests as "skipped" instead of "passed"
- Remove placeholder assertion from skipped update-service test

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Misaka
2026-04-04 21:11:12 +08:00
parent 5d8563a4c9
commit d7ebb10f38
5 changed files with 93 additions and 145 deletions

View File

@@ -146,9 +146,8 @@ describe('UpdateService', () => {
// Note: This integration scenario is complex to test in unit tests.
// Moved to integration tests: tests/integration/update-workflow.test.ts
// Skip this test as it requires real integration testing
it.skip('checks updates for user and auto-downloads available recommendation', async () => {
expect(true).toBe(true) // Placeholder - see integration tests
// Covered by integration tests
})
it('returns disabled catalog when update services are unavailable', async () => {