Skip to content

liquid-labs/shellspec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@liquid-labs/shellspec

NPM installation wrapper for shellspec, a full-featured BDD unit testing framework for shell scripts.

Install

npm

npm install @liquid-labs/shellspec

bun

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/shellspec

Usage

Once installed, run shellspec via npx or bunx:

npx shellspec
bunx shellspec

All 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.sh

How it works

  1. During npm install, the postinstall script fetches the latest shellspec release version from the GitHub API and downloads the corresponding tarball.
  2. The tarball is extracted into dist/shellspec/ within the package directory.
  3. The bin/shellspec wrapper resolves its own location (through symlinks) and delegates all arguments to dist/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

About

NPM installation wrapper for 'shellspec' shell based unit testing.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages