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

Fails parsing single line environment options #5104

Open
6 tasks done
hahanein opened this issue Feb 2, 2024 · 0 comments · May be fixed by #5105
Open
6 tasks done

Fails parsing single line environment options #5104

hahanein opened this issue Feb 2, 2024 · 0 comments · May be fixed by #5105

Comments

@hahanein
Copy link

hahanein commented Feb 2, 2024

Describe the bug

Vitest cannot parse environment options declared on a single line:

/** @vitest-environment-options {"url": "https://vitejs.dev"} */

A JSON parse error will be thrown.

Reproduction

Add /** @vitest-environment-options {"url": "https://vitejs.dev"} */ to a test file.

System Info

System:
    OS: Linux 6.7 Arch Linux
    CPU: (8) x64 AMD Ryzen 5 PRO 3500U w/ Radeon Vega Mobile Gfx
    Memory: 7.80 GB / 13.54 GB
    Container: Yes
    Shell: 5.2.26 - /bin/bash
  Binaries:
    Node: 21.6.1 - /usr/bin/node
    Yarn: 1.22.19 - /usr/bin/yarn
    npm: 10.4.0 - /usr/bin/npm
    pnpm: 8.11.0 - /usr/bin/pnpm
    bun: 1.0.22 - /usr/bin/bun

Used Package Manager

pnpm

Validations

@hahanein hahanein linked a pull request Feb 2, 2024 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant