We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When trying to install a version of a package in jest, deasync throws
deasync
Assertion failed: (handle->type == UV_TCP || handle->type == UV_TTY || handle->type == UV_NAMED_PIPE), function uv___stream_fd, file ../deps/uv/src/unix/stream.c, line 1632.
Test code inside jest:
import niv from 'npm-install-version'; const packageName = 'noop2@1'; niv.install(packageName); const noop = niv.require(packageName);
deasync bug @ abbr/deasync#55
Is there a workaround?
as a side note, had to add node to moduleFileExtensions in jest config e.g. moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'node'],
node
moduleFileExtensions
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'node'],
The text was updated successfully, but these errors were encountered:
Found a workaround: install the package version outside of jest's context, something like:
// package.json "scripts": { "test:prepare": "niv foo@1 && niv foo@2". "test": "npm run test:prepare && FOO_VERSION=1 jest && FOO_VERSION=2 jest" }
This still allows me to require a specific version
require
require(`foo@${process.env.FOO_VERSION}`)
Sorry, something went wrong.
clearing the cache seems work for me as a work around $ jest --clearCache && jest
$ jest --clearCache && jest
No branches or pull requests
When trying to install a version of a package in jest,
deasync
throwsTest code inside jest:
deasync bug @ abbr/deasync#55
Is there a workaround?
as a side note, had to add
node
tomoduleFileExtensions
in jest confige.g.
moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'node'],
The text was updated successfully, but these errors were encountered: