You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using vitest 1.1.1 my snapshots are getting renamed to include the file path.
For example, a test file with:
path ./lib/chart-components/drawChart.test.ts
describe name draw-chart
test name should generate an image data url for scenario 38
Would, with jest, generate a snapshot filename: draw-chart-test-ts-draw-chart-should-generate-an-image-data-url-for-scenario-38-1-snap.png
Whereas with vitest re-running the test generates a new snapshot file with filename: draw-chart-test-ts-lib-chart-components-draw-chart-test-ts-draw-chart-should-generate-an-image-data-url-for-scenario-38-1-snap.png
Node is then falling over with ENAMETOOLONG error when running the tests from the root directory of my monorepo.
I thought the toMatchImageSnapshot() option customSnapshotIdentifier might help but reducing it to:
When using vitest 1.1.1 my snapshots are getting renamed to include the file path.
For example, a test file with:
./lib/chart-components/drawChart.test.ts
draw-chart
should generate an image data url for scenario 38
Would, with jest, generate a snapshot filename:
draw-chart-test-ts-draw-chart-should-generate-an-image-data-url-for-scenario-38-1-snap.png
Whereas with vitest re-running the test generates a new snapshot file with filename:
draw-chart-test-ts-lib-chart-components-draw-chart-test-ts-draw-chart-should-generate-an-image-data-url-for-scenario-38-1-snap.png
Node is then falling over with ENAMETOOLONG error when running the tests from the root directory of my monorepo.
I thought the
toMatchImageSnapshot()
optioncustomSnapshotIdentifier
might help but reducing it to:Gives:
lib-chart-components-draw-chart-test-ts-draw-chart-should-generate-an-image-data-url-for-scenario-38.png
Which tells me the Vitest API differs from Jest.
I'm pretty much blocked by this so help would be appreciated!
The text was updated successfully, but these errors were encountered: