Skip to content

Commit c9e326b

Browse files
committed
vitest now resolves alias paths
1 parent b1b9933 commit c9e326b

File tree

4 files changed

+35
-5
lines changed

4 files changed

+35
-5
lines changed

pnpm-lock.yaml

Lines changed: 31 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pnpm-workspace.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
packages:
2-
- "services/*"
2+
- "services"

services/src/user/user-service.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
// TODO: Investigate why vitest integration tests doesn't work with path aliases
2-
//import { compare, hash } from 'services/crypto/hash'
3-
import { compare, hash } from '../crypto/hash'
1+
import { compare, hash } from 'services/crypto/hash'
42
import type { ChangePasswordPayload } from '$components/container/profile/schema'
5-
import { omit } from '../util/omit'
3+
import { omit } from 'services/util/omit'
64
import type { SelectableUser, User } from './user'
75
import { changeUserPasswordById, deleteUserById, getUserById } from './user-repository'
86

vitest.workspace.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ export default defineWorkspace([
99
}
1010
},
1111
{
12+
extends: './vite.config.ts',
1213
test: {
1314
include: ['src/**/*.integration.test.ts', 'services/**/*.integration.test.ts'],
1415
name: 'integration'

0 commit comments

Comments
 (0)