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

[ERR_WORKER_UNSUPPORTED_OPERATION]: process.chdir() is not supported in workers #2956

Closed
ctjlewis opened this issue Jan 27, 2022 · 3 comments

Comments

@ctjlewis
Copy link

It's not possible to change the process directory in an Ava test, and trying the hack suggested in #2591 throws the same error.

I intend to change directory and spawn processes in my test. Do I have to drop ava for these kinds of things?

@ctjlewis
Copy link
Author

Working around by changing directory in the shell context, i.e.

await shell("cd ./my/dir && yarn test");

@sindresorhus
Copy link
Member

nodejs/node#41673

@sindresorhus
Copy link
Member

You can use the --no-worker-threads flag.

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

3 participants