Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(tests): add install-npm tests
  • Loading branch information
Airscript committed Aug 14, 2022
commit adf5d0559c8c54bd13b2d7dc7128229aa0e3cc79
1 change: 1 addition & 0 deletions scripts/install/netlify-cli.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#!/bin/bash
npm install -g netlify-cli
echo "Netlify CLI installed successfully."
1 change: 1 addition & 0 deletions scripts/install/npm.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
#!/bin/bash
npm install -g npm
echo "npm installed successfully."
19 changes: 19 additions & 0 deletions tests/install-npm.bats
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!./tests/bats/bin/bats

setup() {
load 'libraries/bats-support/load'
load 'libraries/bats-assert/load'
source ./tests/mocks.sh
}

@test "Install npm" {
run ./scripts/install/npm.sh
assert_output --partial "$INSTALL_NPM"
refute_output --partial "ERR!"
}

@test "Install Netlify CLI" {
run ./scripts/install/netlify-cli.sh
assert_output --partial "$INSTALL_NETLIFY_CLI"
refute_output --partial "ERR!"
}