-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add nupm test
#19
Add nupm test
#19
Conversation
Running `nupm` by itself will ask to create NUPM_HOME directory, if it does not exist. Also ensures $env.NUPM_HOME exists. The `dirs` module contains utilities and constants related to directories used in nupm.
This allows for other potential flags, such as --git, and running without any flags to install from a package repository.
These are not need for installation, just for publishing.
* Changes module package to install the module, not the whole git repository. * Modules are installed under $env.NUPM_HOME/modules and scripts under $env.NUPM_HOME/scripts. * Adds --force flag to force overwrite * If there is no 'scripts' field in package.nuon in a script package, nupm attempts to install <package_name>.nu.
This allows the build script to know information about itself.
Useful if the build script writes or downloads files, for example.
This also makes it simpler but removes filename information where the test is.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a few minor questions and we should be good, love the ouput, the tests and the speed, very nice work 👌 🙏
do not take the Notes into account, i can address them in followup PRs 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i love this new command, thanks @kubouch 🙏
this should bring all the new `throw-error` calls from nushell#19.
Adds a simple test runner to
nupm
.nupm test
requires atests
directory module—all exported commands from the module are treated as tests to run. It is possible to filter tests by name. The--show-stdout
flag is useful for debugging.Example tests are added for
nupm install
. As a consequence, a few bugs innupm install
were discovered and fixed as well.The three tests included in this PR run ~5.7x faster with
nupm test
than usingstd testing run-tests
(~127 ms vs. ~735 ms).