@buildshipapp/node-test-suite
v0.0.2
Published
CLI tool designed to run tests written in the BuildShip app
Readme
Test Suite for BuildShip Nodes
This package contains a CLI based test runner for testing BuildShip nodes.
Usage
In a git project that is synced with your BuildShip project (GitHub integration available for enterprise customers), run the following command:
npm i @buildshipapp/node-test-suite -gThen, execute the test runner:
bs-node-test-suiteIf your git project is a mirror of your team/library nodes, set the LIB_NODE_REPO environment
variable.
The runner will automatically:
- Discovers both TypeScript and JSON test files
- Processes each type using appropriate handlers
- Reports results for both test types
- Cleans up temporary files
How to set?
Secrets
You can set secrets using environment variables. For example, if you have a secret named API_KEY
that is used by your node, you can set it like this:
cat <<EOF > secrets.json
{
"API_KEY": "your_api_key_here"
}
EOF
export secretEnv=$(cat secrets.json | jq '@json')Project Environment Variables
You can set project environment variables using environment variables. For example, if you have a
project environment variable named PROJECT_ID that is used by your node, you can set it like this:
cat <<EOF > projectEnv.json
{
"PROJECT_ID": "your_project_id_here"
}
EOF
export projectEnv=$(cat projectEnv.json | jq '@json')CI/CD Integration
GitHub Actions
