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

Why test.each object-variable for string data type has quotes? #5946

Open
6 tasks done
ranjan-purbey opened this issue Jun 20, 2024 · 0 comments · May be fixed by #6403
Open
6 tasks done

Why test.each object-variable for string data type has quotes? #5946

ranjan-purbey opened this issue Jun 20, 2024 · 0 comments · May be fixed by #6403
Labels
breaking change p2-nice-to-have Not breaking anything but nice to have (priority)

Comments

@ranjan-purbey
Copy link

Describe the bug

Basically jestjs/jest#7689 but for vitest.

When using test.each with an array of objects, object properties injected in the test names, are printed within quotes while other data-types like number and boolean are not.

Reproduction

https://stackblitz.com/edit/vitest-dev-vitest-fbcukv?file=test%2Fbasic.test.ts

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 => 1.6.0 
    vite: latest => 5.3.1 
    vitest: latest => 1.6.0

Used Package Manager

npm

Validations

@sheremet-va sheremet-va added the p2-to-be-discussed Enhancement under consideration (priority) label Jul 1, 2024
@sheremet-va sheremet-va added breaking change p2-nice-to-have Not breaking anything but nice to have (priority) and removed pending triage p2-to-be-discussed Enhancement under consideration (priority) labels Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change p2-nice-to-have Not breaking anything but nice to have (priority)
Projects
Status: Approved
Development

Successfully merging a pull request may close this issue.

2 participants