vitest icon indicating copy to clipboard operation
vitest copied to clipboard

feat(browser): allow custom HTML path, respect plugins `transformIndexHtml`

Open sheremet-va opened this issue 1 year ago • 1 comments

Description

Closes #6394

This PR adds an option to specify your own HTML file for the Browser Mode. Now Vitest also always calls transformIndexHtml plugin hook when serving the tester file.

export default defineConfig({
  test: {
    browser: {
      testerHtmlPath: './component-testing.html',
    },
  },
})

Since Browser Mode is experimental, this PR can be merged with fixes and doesn't need to follow semver.

TODO

  • [x] Tests
    • Non-existing file path
    • Error during transformIndexHtml
    • Valid HTML
    • Valid custom transformIndexHtml hook

sheremet-va avatar Oct 16 '24 13:10 sheremet-va

Deploy Preview for vitest-dev ready!

Name Link
Latest commit a5c5b04ac2ce413e3e3fc3be20c2e0fc14329586
Latest deploy log https://app.netlify.com/sites/vitest-dev/deploys/671b8b2c30cd5b0008260d95
Deploy Preview https://deploy-preview-6725--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 site configuration.

netlify[bot] avatar Oct 16 '24 13:10 netlify[bot]