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

issue with resultDir #25

Closed
MiVvlt opened this issue Mar 17, 2018 · 4 comments
Closed

issue with resultDir #25

MiVvlt opened this issue Mar 17, 2018 · 4 comments

Comments

@MiVvlt
Copy link

MiVvlt commented Mar 17, 2018

When in watch mode, jest seems to look for a file in resultDir, first time it works, then, it keeps adding resultDir to the path and gives errors.

Issue:
src/modules/users/e2e/users.e2e-spec.ts
PASS src/modules/users/users.controller.spec.ts
PASS src/modules/users/users.component.spec.ts

Test Suites: 3 passed, 3 total
Tests: 16 passed, 16 total
Snapshots: 0 total
Time: 0.752s, estimated 1s
Ran all test suites.
----------------------|----------|----------|----------|----------|----------------|
File | % Stmts | % Branch | % Funcs | % Lines |Uncovered Lines |
----------------------|----------|----------|----------|----------|----------------|
All files | 81.31 | 56.25 | 90 | 92.31 | |
src | 80 | 36.36 | 100 | 90.91 | |
app.module.ts | 80 | 36.36 | 100 | 90.91 | 5 |
src/modules/users | 81.52 | 60.38 | 89.66 | 92.54 | |
users.component.ts | 72.97 | 57.89 | 76.92 | 88.89 | 5,13,14 |
users.controller.ts | 89.74 | 73.91 | 100 | 96.43 | 5 |
users.module.ts | 81.25 | 36.36 | 100 | 91.67 | 5 |
----------------------|----------|----------|----------|----------|----------------|

Watch Usage: Press w to show more.(node:6531) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open 'reports/reports/reports/reports/js/bootstrap.min.js'
(node:6531) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 33)
(node:6531) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open 'reports/reports/reports/reports/js/diff2html.min.js'
(node:6531) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 34)
(node:6531) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open 'reports/reports/reports/reports/js/jquery.min.js'
(node:6531) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 35)
(node:6531) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open 'reports/reports/reports/reports/js/holder.js'
(node:6531) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 36)
(node:6531) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open 'reports/reports/reports/reports/css/bootstrap.min.css'
(node:6531) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 37)
(node:6531) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, open 'reports/reports/reports/reports/css/diff2html.min.css'
(node:6531) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 38)

package.json:

"jest": {
"transform": {
"^.+\.tsx?$": "ts-jest"
},
"testRegex": "(/src/.*|(\.|/)(e2e-spec|spec))\.(ts)$",
"testResultsProcessor": "jest-stare",
"moduleFileExtensions": [
"ts",
"js"
],
"collectCoverage": true,
"testDirectoryName": "src",
"testFileExtensions": [
"ts"
],
"modulePathIgnorePatterns": [
"/.idea/",
"/coverage/",
"/reports/"
],
"watchPathIgnorePatterns": [
"/.idea/",
"/coverage/",
"/reports/"
]
},
"jest-stare": {
"resultDir": "reports",
"log": false
}

@dkelosky
Copy link
Owner

Thanks - I'll try this out and hope to fix it soon. I didn't think to test in --watch.

dkelosky added a commit that referenced this issue Mar 17, 2018
@dkelosky dkelosky mentioned this issue Mar 17, 2018
@dkelosky dkelosky reopened this Mar 17, 2018
@dkelosky
Copy link
Owner

Can you retry your test with version 0.1.24-0?

If the report seems to infinitely loop, you may need to add to your jest config:

    "watchPathIgnorePatterns": [
      ".*jest-stare.*\\.js"
    ],

Because of these issues:

@MiVvlt
Copy link
Author

MiVvlt commented Mar 17, 2018

0.1.24-0 fixed it for me, thank you for the quick response and solution.
Great reporter by the way. Keep up the good work!

@MiVvlt MiVvlt closed this as completed Mar 17, 2018
@dkelosky
Copy link
Owner

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants