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

@vue/cli-plugin-unit-jest fails with error EBADF: bad file descriptor, close #3605

Closed
phil-scott-78 opened this issue Mar 10, 2019 · 2 comments

Comments

@phil-scott-78
Copy link

Version

3.5.0

Reproduction link

https://github.com/phil-scott-78/jest-EBADF

Environment info

Windows 10

Steps to reproduce

npm run unit:test

What is expected?

Tests to run

What is actually happening?

Sporadic failure with an error EBADF: bad file descriptor


This is due to [email protected]. Newer versions of jest have been updated to force the version to 2.4.1.

See:

@haoqunjiang
Copy link
Member

Actually I can't reproduce this issue locally. But according to the discussions in the above link, it may be related to race conditions across multiple processes, so you can try to enable --runInBand flag to see if the error disappears:

npm run test:unit -- --runInBand

@phil-scott-78
Copy link
Author

Thanks for your quick reply. Ran it with --runInBand a few times and it does seem to resolve it. Also seemed to have success with a specific resolution when using yarn. But I don't really want to update build scripts and the such with this work around. Fortunately I can hold off on the upgrade on vue-cli for a while until a new version of @vue/cli-plugin-unit-jest is pushed with the latest version of jest.

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

No branches or pull requests

2 participants