fix(testing): add aliases for package and locales in vitest configuration

- Introduced alias mappings for "@pkg" pointing to the package.json file and "@locales" pointing to the locales directory.
- This enhancement simplifies module resolution and improves code organization in the renderer layer.

Signed-off-by: Innei <tukon479@gmail.com>
This commit is contained in:
Innei 2025-05-16 00:11:11 +08:00
parent ff8cee07e1
commit 0b92079dd0
No known key found for this signature in database
GPG Key ID: 0F62D33977F021F7
1 changed files with 4 additions and 0 deletions

View File

@ -16,6 +16,10 @@ export default defineProject({
globals: true,
setupFiles: [resolve(__dirname, "./setup-file.ts")],
environment: "happy-dom",
alias: {
"@pkg": resolve(__dirname, "./package.json"),
"@locales": resolve(__dirname, "../../../../locales"),
},
},
define: {