-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
anchor test npm/mocha issues #942
Comments
We used |
I think the currently approach with |
Just put to |
I think this behaviour makes sense. If you are using the globally installed anchor-cli the other modules you run in [scripts.test] should also be global. It's the same in your shell, you can only run global |
I've been keeping up with updates on the project lately (e.g. the 18.2.0 update) but I am still getting some npm/node issues.
I went through the installation steps earlier with
anchor-cli v0.18.2
but still gotanchor test
still failed with:Trying to install
ts-mocha
globally helps, but then I need to also installtypescript
globally.I'm not sure why the locally packages are not resolved correctly, but I wonder if it would help to run the tests using an npm script, e.g.
And then in
Anchor.toml
run this script directly:If I make these changes in my local project, the tests run correctly without the globally installed modules. I think this would be helpful, to avoid globally installed modules.
I'm happy to make a PR with these changes, if this is an appropriate direction.
The text was updated successfully, but these errors were encountered: