Clear and concise description of the problem
Currently, test.resolveSnapshotPath(testfilePath, extension) does not provide a way to discover the project root.
This make it not possible to create snapshots relative to the project root in workspace use case.
for example:
- packages
- project-a
# want to create snapshots here, similar to the default of `jest-image-snapshot`
- __snapshot__
- vitest.config.ts
- vitest.workspace.ts
Suggested solution
pass a context object to the function including project specific info, such as root and other information.
Alternative
No response
Additional context
No response
Validations
Clear and concise description of the problem
Currently,
test.resolveSnapshotPath(testfilePath, extension)does not provide a way to discover the project root.This make it not possible to create snapshots relative to the project root in workspace use case.
for example:
- packages - project-a # want to create snapshots here, similar to the default of `jest-image-snapshot` - __snapshot__ - vitest.config.ts - vitest.workspace.tsSuggested solution
pass a context object to the function including project specific info, such as
rootand other information.Alternative
No response
Additional context
No response
Validations