-
Notifications
You must be signed in to change notification settings - Fork 332
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
No npm "test" script defined. You must define a "test" script i #1413
Comments
Doctor mode only works if you have automated tests in your project. If you don't have automated tests, then there is nothing to test the upgrades against. You should just use |
But id like to test if the upgrade wont be messing things or arrive at some incompatible libraries... for example i dont know if there could be any problem between react-chatbotify and es_lint latest versions... Thats the reason why i want to use doctor. In python you have the option --test to install or upgrade libraries. It makes all the things but the library is not really installed... then if you dont have any problem you can install safety the upgrade or new library without that parameter. Then i leave a feature request: create a test or use doctor without tests, just to be sure that the process of upgrading is not going to put the system in not desired state ( buggy, incompatible, stop working...) As i read if i use directly ncu -u...it would just upgrade all the libraries without any tests...so that can lead my system to be unstable or stop working..then going back could be no easy....Perhaps im missing something. Thanks for your help |
The closest thing to what you are looking for is I'm not aware of any general compatibility test as you describe, though I assume that npm or yarn does some checks on install. This is another good reason for project-specific unit tests. If you have automated test coverage of the key functionality of your app or website, then any compatibility issue with installs will fail the tests. |
Steps to Reproduce
1 - Install : npm install -g npm-check-updates
2 - Run: ncu --doctor -u
3 - Error
eduardo@MiPcLinux:~/Descargas/workshop-react$ ncu --doctor -u
No npm "test" script defined. You must define a "test" script in the "scripts" section of your package.json to use --doctor.
When installing should address this or give some example of tests.
Thanks to copilot i added this test ( but dont know if its correct or what is supposed to do the test script as no info is provided). For example i added and exit 1 to the echo, but it still gave me an error. So i made a test script with only one echo as you can see:
The text was updated successfully, but these errors were encountered: