fix-integration-alias-resolution: Stabilize Vitest integration alias resolution #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "task/fix-integration-alias-resolution"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Assigned idea
Make the
@alias invitest.integration.config.tsresolve to an absolute path so integration tests work reliably regardless of the current working directory, and add a small integration test that proves the alias works.Approach: 1) Update
vitest.integration.config.tsto use an absolute alias target (e.g.,path.resolve(__dirname, 'src')) instead of'./src'.2) (Optional but recommended) Set
root: __dirnamein the config to further reduce CWD sensitivity.3) Add a tiny probe module
src/__aliasProbe.tsexporting a constant.4) Add an integration test
src/alias-resolution.integration.test.tsthat imports the probe via@/__aliasProbeand asserts the value.Verification: Run:
npx vitest --config vitest.integration.config.ts --runcd src && npx vitest --config ../vitest.integration.config.ts --runBoth runs should pass, and
src/alias-resolution.integration.test.tsshould successfully import@/__aliasProbe.Risk: Low. Changes are isolated to the Vitest integration config and add-only test/probe files; the main risk is if the repo’s tooling expects relative aliasing for some reason or uses a different module resolution strategy.
Agent context
Task slug: fix-integration-alias-resolution
Branch: task/fix-integration-alias-resolution
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.