Skip to content

Conversation

@macarie
Copy link
Member

@macarie macarie commented Sep 21, 2025

Description

Fixes #8604

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • It's really useful if your PR references an issue where it is discussed ahead of time. If the feature is substantial or introduces breaking changes without a discussion, PR might be closed.
  • Ideally, include a test that fails without this PR but passes with it.
  • Please, don't make changes to pnpm-lock.yaml unless you introduce a new test example.
  • Please check Allow edits by maintainers to make review process faster. Note that this option is not available for repositories that are owned by Github organizations.

Tests

  • Run the tests with pnpm test:ci.

Documentation

  • If you introduce new functionality, document it. You can run documentation with pnpm run docs command.

Changesets

  • Changes in changelog are generated from PR name. Please, make sure that it explains your changes in an understandable manner. Please, prefix changeset messages with feat:, fix:, perf:, docs:, or chore:.

@macarie macarie force-pushed the fix/empty-path-after-taking-screenshot branch 2 times, most recently from c55c3cd to cde9b3a Compare September 22, 2025 19:50
@netlify
Copy link

netlify bot commented Sep 22, 2025

Deploy Preview for vitest-dev ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 4aea1aa
🔍 Latest deploy log https://app.netlify.com/projects/vitest-dev/deploys/68d2fb0e0511960008c0fcbd
😎 Deploy Preview https://deploy-preview-8605--vitest-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

// there seems to be a bug in webdriverio, `X:/` gets appended to cwd, so we convert to `X:\`
const buffer = await element.saveScreenshot(
savePathWithExtension,
platformNormalize(savePathWithExtension),
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As said in the comment above, we need to change X:/ to X:\ when using Windows, so the simplest thing we can do is to use normalize from node:path and normalize only this path.

@macarie macarie marked this pull request as ready for review September 22, 2025 20:14
@sheremet-va sheremet-va merged commit b1c8fdb into vitest-dev:main Sep 24, 2025
12 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

toMatchScreenshot still creates a folder with the test's filename even when specifing otherwise

2 participants