-
Notifications
You must be signed in to change notification settings - Fork 308
Closed
Labels
Description
Describe the bug
My test names look like this:
it(`
Given a user requesting another user's personal info
When they call the endpoint
Then it returns a status 403
`, async () => {
To Reproduce
Steps to reproduce the behavior:
- Name a test with a multiline template string
- Click on the button to run the single test
- See that the
\n
are not properly escaped when sent to the jest command line
Expected behavior
It should escape the \n
of the test name to a string \n Given a user requesting another user's personal info\n When they call the endpoint
in shell
Screenshots
Environment (please complete the following information):
- vscode-jest version: v6.4.0
node -v
: 20.18npm -v
oryarn --version
: [e.g., npm 10.1.0]- jest or react-scripts (if you haven’t ejected) version: [e.g., jest 29.7.0]
- your vscode-jest settings:
{
"jest.enable": true,
"jest.runMode": "on-demand",
"jest.virtualFolders": [
{
"name": "unit",
"runMode": "on-save",
"jestCommandLine": "yarn test"
},
{
"name": "e2e",
"runMode": "on-demand",
"jestCommandLine": "yarn test:e2e"
}
]
}
- Operating system: MacOS 14.4.1
Prerequisite
- are you able to run jest from the command line? yes
- where do you run jest CLI from? root directory
- how do you run your tests from the command line? yarn test
Additional context
Add any other context about the problem here.
The fastest (and the most fun) way to resolve the issue is to submit a pull request yourself. If you are interested, please check out the contribution guide, we look forward to seeing your PR...