Skip to content

Commit

Permalink
test(types): fix broken tests (#1773)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcalexiei authored Jul 16, 2024
1 parent 08ba6ae commit 0338bf1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions vitest.workspace.typescript.mts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,17 @@ export default defineWorkspace(
test: {
dir: `./${dirPath}`,
name: workspaceName,
alias: {
/**
* From `vitest` >= 2 imports are resolved even if we are running only typecheck tests.
* This will result in:
* ```text
* Error: Failed to resolve entry for package "react-i18next". The package may have incorrect main/module/exports specified in its package.json.
* ```
* To avoid a useless build process before running these tests an empty alias to `react-i18next` is added.
*/
'react-i18next': '',
},
typecheck: {
enabled: true,
include: [`**/${dirPath}/*.test.{ts,tsx}`],
Expand Down

0 comments on commit 0338bf1

Please sign in to comment.