Repository navigation
Commit 2ca14a5
authored
test(portal): make vitest config resolve aliases and use jsdom (#3458)
The portal vitest config (added in #3454 / CS-760) had two gaps that would
break any test beyond the current pure-logic one:
- No resolve.alias for the tsconfig `@/*` path, so any test importing via
`@/...` fails at module resolution. Mirror `@` -> ./src, matching
apps/app and apps/framework-editor.
- environment was 'node' while the include glob targets .jsx/.tsx component
tests, which need DOM APIs. Switch to jsdom (both sibling configs use it);
node-only tests still run fine under it.
Follow no-plugin approach (hand-mapped alias) like framework-editor to avoid
the vite plugin type clash with Next's build-time typecheck on Vercel. Add
jsdom + vitest as portal devDependencies so resolution no longer relies on
workspace hoisting.1 parent cd31daf commit 2ca14a5
3 files changed
Lines changed: 21 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
47 | 48 | | |
48 | 49 | | |
49 | | - | |
| 50 | + | |
| 51 | + | |
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
3 | 9 | | |
4 | 10 | | |
5 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
6 | 15 | | |
7 | 16 | | |
8 | 17 | | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
9 | 24 | | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments