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 UI renders suite name / test name as HTML #6061

Closed
6 tasks done
rothsandro opened this issue Jul 9, 2024 · 0 comments · Fixed by #6070
Closed
6 tasks done

Vitest UI renders suite name / test name as HTML #6061

rothsandro opened this issue Jul 9, 2024 · 0 comments · Fixed by #6070
Assignees
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)

Comments

@rothsandro
Copy link

Describe the bug

If a suite name or test name contains HTML it will be rendered as HTML instead of showing the HTML code. We often use the name of the component as suite name, like describe("<MyComponent />", () => {}). After updating to Vitest UI 2.x the suite name is now rendered as HTML, resulting in an empty suite name in the UI.

image

Reproduction

https://stackblitz.com/edit/vitest-dev-vitest-qiylvf?file=test%2Fsuite.test.ts&initialPath=__vitest__/

System Info

System:
    OS: Linux 5.0 undefined
    CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
    Memory: 0 Bytes / 0 Bytes
    Shell: 1.0 - /bin/jsh
  Binaries:
    Node: 18.20.3 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.3 - /usr/local/bin/npm
    pnpm: 8.15.6 - /usr/local/bin/pnpm
  npmPackages:
    @vitest/ui: latest => 2.0.1 
    vite: latest => 5.3.3 
    vitest: latest => 2.0.1

Used Package Manager

npm

Validations

@sheremet-va sheremet-va added p3-minor-bug An edge case that only affects very specific usage (priority) pr welcome and removed pending triage labels Jul 9, 2024
@userquin userquin self-assigned this Jul 9, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jul 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
p3-minor-bug An edge case that only affects very specific usage (priority)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants