Can not create temp direcotry when run Jest from WebStorm
See original GitHub issueWhen trying to run Jest test from WebStorm with Jest configuration every time get an error:
[jest-html-reporters]: Param attach error, can not save as a image, pic / (Home Page) should load without error - test google 1 log failed.
console.error
[Error: ENOENT: no such file or directory, open '/Users/mc92/Work/PuppTry/node_modules/jest-html-reporters/temp/images/16119399801940.6875269435668176.jpg'] {
errno: -2,
code: 'ENOENT',
syscall: 'open',
path: '/Users/mc92/Work/PuppTry/node_modules/jest-html-reporters/temp/images/16119399801940.6875269435668176.jpg'
}
Not created temp directory
But if run test form console using npm run test or npx run test - works well and create a report.
I would like it to always work (even run from WebStorm)
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Run/Debug Configuration: Jest - WebStorm - JetBrains
In this dialog, create configurations for running Jest tests. ... However, if you do not want to share the .idea directory, you can...
Read more >Running a single test in WebStorm using Jest - Stack Overflow
I'm adding screenshots to clarify what is happening exactly now when I run a single test. Tests · Configuration. Is there a way...
Read more >Cannot run Jest tests from Webstorm · Issue #2314 · nrwl/nx
To run within the webstorm you need to provide the IDE environment variable under Run/Debug Configuration . Hope this issue can be fixed...
Read more >ts-node - npm
ts-node is a TypeScript execution engine and REPL for Node.js. It JIT transforms TypeScript into JavaScript, enabling you to directly execute ...
Read more >Run/Debug Configuration: Jest - Help | IntelliJ IDEA - JetBrains
The search is performed in the file system upwards from the working directory. If no appropriate package.json file is found, then a Jest...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@roman-petrov, for now, you can use
JEST_HTML_REPORTERS_TEMP_DIR_PATHenv variable. Set it explicitly before running tests, at least it may solve your issue with running tests on CI env.Hi all, a new version(2.1.5) has released. we will change to using the system’s temp folder as this reporter’s temp attach folder. It will resolve issues like this, thanks to @sirdir’s great idea and contribution.