2 Commits

Author SHA1 Message Date
fd9175925e Use vue-tsc --build in frontend hook to match CI
All checks were successful
CI / backend-test (push) Successful in 57s
CI / frontend-test (push) Successful in 21s
CI / frontend-e2e (push) Successful in 52s
CI / build-and-publish (push) Has been skipped
The hook used --noEmit which is less strict than CI's --build,
causing type errors to slip through.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 22:54:41 +01:00
63108f4eb5 Fix TypeScript type errors in frontend test files
- Add missing timezone field to CreateEventResponse mock
- Fix createTestRouter signature to accept optional token parameter
- Add non-null assertion for dateField element access

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 22:53:36 +01:00
3 changed files with 4 additions and 3 deletions

View File

@@ -16,7 +16,7 @@ cd "$CLAUDE_PROJECT_DIR/frontend"
ERRORS=""
# Type-check
if OUTPUT=$(npx vue-tsc --noEmit 2>&1); then
if OUTPUT=$(npm run type-check 2>&1); then
:
else
ERRORS+="Type-check failed:\n$OUTPUT\n\n"

View File

@@ -173,6 +173,7 @@ describe('EventCreateView', () => {
organizerToken: 'org-456',
title: 'Birthday Party',
dateTime: '2026-12-25T18:00:00+01:00',
timezone: 'Europe/Berlin',
expiryDate: '2026-12-24',
},
error: undefined,

View File

@@ -10,7 +10,7 @@ vi.mock('@/api/client', () => ({
},
}))
function createTestRouter() {
function createTestRouter(_token?: string) {
return createRouter({
history: createMemoryHistory(),
routes: [
@@ -84,7 +84,7 @@ describe('EventDetailView', () => {
const wrapper = await mountWithToken()
await flushPromises()
const dateField = wrapper.findAll('.detail__value')[0]
const dateField = wrapper.findAll('.detail__value')[0]!
expect(dateField.text()).toContain('(Europe/Berlin)')
// The formatted date part is locale-dependent but should contain the year
expect(dateField.text()).toContain('2026')