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
Specify test command to run #543
Comments
I think this sounds more like a use-case specific change, rather than a functional one with |
Thanks for the reply. I have already done what you suggest above, disabling np's tests and then using a lifecycle hook, which does work, but feels a bit messy. Just to explain, when I publish to npm, I want to run tests on the exact code for the release (so the file(s) after packing the archive for npm), and this is not, for obvious reasons, my default test in package.json. |
Ah, makes sense. |
Ok, makes sense. For documentation's sake, my current np command for the project (in beta) is: |
I would also find this useful. We have two test commands in our package.json: "scripts": {
"test": "jest --watch",
"ci:test": "jest",
...
} Our default |
@sindresorhus , what do you think about this feature? We would have to run |
Sounds like there are some valid use-cases for this. A good PR would be welcome. The PR should also include docs that describe the use-cases mentioned in this thread. This is useful for users to make them realize why they would want to use such an option. |
Just a heads up for anyone looking into this, I will be taking this up. |
I need to run a slightly different set of tests before publishing
Is this possible?
For example, instead of np running 'yarn test', I want it to run 'yarn test-npm'.
How can I specify this (without changing the definition of "test") ?
The text was updated successfully, but these errors were encountered: