@liquid-labs/shellspec
v1.0.0
Published
NPM installation wrapper for 'shellspec' shell based unit testing.
Maintainers
Readme
@liquid-labs/shellspec
NPM installation wrapper for shellspec, a full-featured BDD unit testing framework for shell scripts.
Install
npm
npm install @liquid-labs/shellspecbun
Bun does not run postinstall scripts by default. You must first whitelist the package in your package.json:
{
"trustedDependencies": ["@liquid-labs/shellspec"]
}Then install:
bun add @liquid-labs/shellspecUsage
Once installed, run shellspec via npx or bunx:
npx shellspec
bunx shellspecAll arguments are forwarded directly to the shellspec binary:
npx shellspec --format documentation
npx shellspec spec/my_spec.sh
bunx shellspec --format documentation
bunx shellspec spec/my_spec.shHow it works
- During
npm install, thepostinstallscript fetches the latest shellspec release version from the GitHub API and downloads the corresponding tarball. - The tarball is extracted into
dist/shellspec/within the package directory. - The
bin/shellspecwrapper resolves its own location (through symlinks) and delegates all arguments todist/shellspec/shellspec.
Requirements
The postinstall script requires curl and jq to be available on the system.
Further reading
For documentation on writing shell unit tests, see the shellspec project on GitHub.
License
Apache-2.0
