fix(test): add mock-driver tests for database services
- Add connected-path tests for mysql, sql-server, and postgresql using mocked drivers (mysql2/promise, mssql, pg) covering connect, query, transaction, and disconnect scenarios - Fix tautological assertion in auth-flow.test.ts (hasError >= 0 was always true) - Add tests/integration to vitest exclude list to prevent module cache pollution under isolate:false - Set isolate to true for CI, false for local dev (was: isolate false)
This commit is contained in:
@@ -85,8 +85,10 @@ test.describe('Authentication Flow', () => {
|
||||
const errorMessage = page.locator('.error, [role="alert"], .text-red')
|
||||
const hasError = await errorMessage.count()
|
||||
|
||||
// Either error shown or still on login page
|
||||
expect(hasError >= 0).toBe(true)
|
||||
// Verify login was rejected: either error shown or still on login page
|
||||
const loginDialog = page.locator('[data-testid="login-dialog"]')
|
||||
const isStillOnLoginPage = await loginDialog.isVisible().catch(() => false)
|
||||
expect(hasError > 0 || isStillOnLoginPage).toBe(true)
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user