121 lines
6.7 KiB
Plaintext
121 lines
6.7 KiB
Plaintext
|
||
> memohanzi@0.1.0 test:ci
|
||
> npm run test:unit && npm run test:integration && npm run test:e2e
|
||
|
||
|
||
> memohanzi@0.1.0 test:unit
|
||
> vitest run --coverage
|
||
|
||
|
||
RUN v2.1.9 /Users/shardegger/Projects/memohanzi
|
||
Coverage enabled with v8
|
||
|
||
✓ src/lib/validations/auth.test.ts (18 tests) 3ms
|
||
✓ src/lib/validations/preferences.test.ts (21 tests) 3ms
|
||
|
||
Test Files 2 passed (2)
|
||
Tests 39 passed (39)
|
||
Start at 08:22:51
|
||
Duration 484ms (transform 28ms, setup 108ms, collect 30ms, tests 6ms, environment 310ms, prepare 61ms)
|
||
|
||
% Coverage report from v8
|
||
-------------------|---------|----------|---------|---------|-------------------
|
||
File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
|
||
-------------------|---------|----------|---------|---------|-------------------
|
||
All files | 13.37 | 70.58 | 4.76 | 13.37 |
|
||
memohanzi | 0 | 0 | 0 | 0 |
|
||
...nt.config.mjs | 0 | 0 | 0 | 0 | 1-18
|
||
...ss.config.mjs | 0 | 0 | 0 | 0 | 1-7
|
||
...tion.setup.ts | 0 | 0 | 0 | 0 | 1-54
|
||
memohanzi/e2e | 0 | 0 | 0 | 0 |
|
||
auth.spec.ts | 0 | 0 | 0 | 0 | 1-265
|
||
settings.spec.ts | 0 | 0 | 0 | 0 | 1-356
|
||
memohanzi/prisma | 0 | 0 | 0 | 0 |
|
||
seed.ts | 0 | 0 | 0 | 0 | 1-87
|
||
...zi/src/actions | 0 | 0 | 0 | 0 |
|
||
...ation.test.ts | 0 | 0 | 0 | 0 | 1-271
|
||
auth.ts | 0 | 0 | 0 | 0 | 1-317
|
||
...ation.test.ts | 0 | 0 | 0 | 0 | 1-288
|
||
preferences.ts | 0 | 0 | 0 | 0 | 1-145
|
||
memohanzi/src/app | 0 | 0 | 0 | 0 |
|
||
layout.tsx | 0 | 0 | 0 | 0 | 1-34
|
||
page.tsx | 0 | 0 | 0 | 0 | 1-62
|
||
...app)/dashboard | 0 | 0 | 0 | 0 |
|
||
page.tsx | 0 | 0 | 0 | 0 | 1-119
|
||
...(app)/settings | 0 | 0 | 0 | 0 |
|
||
page.tsx | 0 | 0 | 0 | 0 | 1-71
|
||
...ings-form.tsx | 0 | 0 | 0 | 0 | 1-284
|
||
...p/(auth)/login | 0 | 0 | 0 | 0 |
|
||
page.tsx | 0 | 0 | 0 | 0 | 1-128
|
||
...auth)/register | 0 | 0 | 0 | 0 |
|
||
page.tsx | 0 | 0 | 0 | 0 | 1-151
|
||
.../[...nextauth] | 0 | 0 | 0 | 0 |
|
||
route.ts | 0 | 0 | 0 | 0 | 1-3
|
||
memohanzi/src/lib | 0 | 0 | 0 | 0 |
|
||
auth.ts | 0 | 0 | 0 | 0 | 1-73
|
||
prisma.ts | 0 | 0 | 0 | 0 | 1-13
|
||
...ib/validations | 100 | 100 | 100 | 100 |
|
||
auth.test.ts | 100 | 100 | 100 | 100 |
|
||
auth.ts | 100 | 100 | 100 | 100 |
|
||
...ences.test.ts | 100 | 100 | 100 | 100 |
|
||
preferences.ts | 100 | 100 | 100 | 100 |
|
||
...anzi/src/types | 0 | 0 | 0 | 0 |
|
||
index.ts | 0 | 0 | 0 | 0 |
|
||
-------------------|---------|----------|---------|---------|-------------------
|
||
|
||
> memohanzi@0.1.0 test:integration
|
||
> vitest run --config vitest.integration.config.ts
|
||
|
||
|
||
RUN v2.1.9 /Users/shardegger/Projects/memohanzi
|
||
|
||
stdout | src/actions/auth.integration.test.ts
|
||
🔗 Connecting to test database...
|
||
|
||
stdout | src/actions/auth.integration.test.ts
|
||
✅ Connected to test database
|
||
|
||
✓ src/actions/auth.integration.test.ts (19 tests) 1685ms
|
||
stdout | src/actions/auth.integration.test.ts
|
||
🔌 Disconnecting from test database...
|
||
|
||
stdout | src/actions/preferences.integration.test.ts
|
||
🔗 Connecting to test database...
|
||
|
||
stdout | src/actions/preferences.integration.test.ts
|
||
✅ Connected to test database
|
||
|
||
stdout | src/actions/preferences.integration.test.ts > Preferences Server Actions - Integration Tests > getAvailableLanguages > should handle empty language list
|
||
prisma:error
|
||
Invalid `prisma.language.deleteMany()` invocation in
|
||
/Users/shardegger/Projects/memohanzi/src/actions/preferences.integration.test.ts:280:29
|
||
|
||
277
|
||
278 it('should handle empty language list', async () => {
|
||
279 // Delete all languages
|
||
→ 280 await prisma.language.deleteMany(
|
||
Error occurred during query execution:
|
||
ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(PostgresError { code: "23001", message: "update or delete on table \"languages\" violates RESTRICT setting of foreign key constraint \"user_preferences_preferredLanguageId_fkey\" on table \"user_preferences\"", severity: "ERROR", detail: Some("Key (id)=(cmi5odqtq001tlw1vkvmnrx1z) is referenced from table \"user_preferences\"."), column: None, hint: None }), transient: false })
|
||
|
||
stdout | src/actions/preferences.integration.test.ts
|
||
🔌 Disconnecting from test database...
|
||
|
||
❯ src/actions/preferences.integration.test.ts (16 tests | 1 failed) 1377ms
|
||
× Preferences Server Actions - Integration Tests > getAvailableLanguages > should handle empty language list 89ms
|
||
→
|
||
Invalid `prisma.language.deleteMany()` invocation in
|
||
/Users/shardegger/Projects/memohanzi/src/actions/preferences.integration.test.ts:280:29
|
||
|
||
277
|
||
278 it('should handle empty language list', async () => {
|
||
279 // Delete all languages
|
||
→ 280 await prisma.language.deleteMany(
|
||
Error occurred during query execution:
|
||
ConnectorError(ConnectorError { user_facing_error: None, kind: QueryError(PostgresError { code: "23001", message: "update or delete on table \"languages\" violates RESTRICT setting of foreign key constraint \"user_preferences_preferredLanguageId_fkey\" on table \"user_preferences\"", severity: "ERROR", detail: Some("Key (id)=(cmi5odqtq001tlw1vkvmnrx1z) is referenced from table \"user_preferences\"."), column: None, hint: None }), transient: false })
|
||
|
||
Test Files 1 failed | 1 passed (2)
|
||
Tests 1 failed | 34 passed (35)
|
||
Start at 08:22:51
|
||
Duration 3.33s (transform 38ms, setup 34ms, collect 73ms, tests 3.06s, environment 0ms, prepare 40ms)
|
||
|