-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add init command for browser tests #5793
Copy link
Copy link
Closed
Labels
feat: browserIssues and PRs related to the browser runnerIssues and PRs related to the browser runnerp2-nice-to-haveNot breaking anything but nice to have (priority)Not breaking anything but nice to have (priority)
Description
Clear and concise description of the problem
Currently, enabling browser mode is not a very straightforward process. As a user who just wants to try it, I need to:
- enable
browserin the config - run
vitest, see@vitest/browseris not installed - install
@vitest/browser - see
webdriveriois not installed - ask yourself what
webdriveriois, install it - run
vitest, see I forgot the browser name - add browser name to the config
Suggested solution
- We need to improve documentation on how the browser mode works internally
- Add
vitest init-browser-mode(name TBD) command that asks what provider should be installed and what browser, then it scaffolds files to enable the browser mode integration:
a. installs the@vitest/browser+ provider package + adds@vitest/browser/providers/{name}totsconfig
Alternative
No response
Additional context
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
feat: browserIssues and PRs related to the browser runnerIssues and PRs related to the browser runnerp2-nice-to-haveNot breaking anything but nice to have (priority)Not breaking anything but nice to have (priority)