Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vitest init browser creates invalid workspace file #6299

Closed
6 tasks done
RobinTail opened this issue Aug 7, 2024 · 1 comment
Closed
6 tasks done

vitest init browser creates invalid workspace file #6299

RobinTail opened this issue Aug 7, 2024 · 1 comment
Labels
feat: browser Issues and PRs related to the browser runner p3-minor-bug An edge case that only affects very specific usage (priority)

Comments

@RobinTail
Copy link
Contributor

Describe the bug

notice two false inside browser:

import { defineWorkspace } from 'vitest/config'

export default defineWorkspace([
  // This will keep running your existing tests.
  // If you don't need to run those in Node.js anymore,
  // You can safely remove it from the workspace file
  // Or move the browser test configuration to the config file.
  'vitest.config.ts',
  {
    extends: 'vitest.config.ts',
    test: {
      browser: {
        enabled: true,
        name: 'chrome',
        provider: 'preview',
false // <— this
false // <— and this
      },
    },
  },
])

Reproduction

yarn exec vitest init browser
yarn exec v1.22.22
◼ This utility will help you set up a browser testing environment.

✔ Choose a language for your tests › TypeScript
✔ Choose a browser provider. Vitest will use its API to control the testing environment › preview
✔ Choose a browser › chrome
✔ Choose your framework › vanilla

System Info

System:
    OS: macOS 14.6
    CPU: (10) arm64 Apple M2 Pro
    Memory: 213.45 MB / 32.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 18.20.1 - ~/.nvm/versions/node/v18.20.1/bin/node
    Yarn: 1.22.22 - ~/.nvm/versions/node/v18.20.1/bin/yarn
    npm: 10.5.0 - ~/.nvm/versions/node/v18.20.1/bin/npm
    pnpm: 8.9.0 - ~/.nvm/versions/node/v18.20.1/bin/pnpm
    bun: 1.1.21 - /opt/homebrew/bin/bun
  Browsers:
    Safari: 17.6
  npmPackages:
    @vitest/browser: ^2.0.5 => 2.0.5 
    @vitest/coverage-istanbul: ^2.0.3 => 2.0.5 
    vitest: ^2.0.3 => 2.0.5

Used Package Manager

yarn

Validations

@sheremet-va sheremet-va added feat: browser Issues and PRs related to the browser runner p3-minor-bug An edge case that only affects very specific usage (priority) and removed pending triage labels Aug 7, 2024
@sheremet-va
Copy link
Member

Fixed in #6305

@github-actions github-actions bot locked and limited conversation to collaborators Aug 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feat: browser Issues and PRs related to the browser runner p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

No branches or pull requests

2 participants