Skip to content

Commit

Permalink
🪲 Preinstall binaries when running user tests (#916)
Browse files Browse the repository at this point in the history
  • Loading branch information
janjakubnanista authored Oct 10, 2024
1 parent a5b8a25 commit c81205d
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/proud-falcons-hear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"decode-lz-options": patch
---

Fix the binary binding for decode-lz-options
2 changes: 1 addition & 1 deletion packages/decode-lz-options/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"license": "MIT",
"bin": {
"build-lz-options": "./cli.js"
"decode-lz-options": "./cli.js"
},
"files": [
"cli.js",
Expand Down
9 changes: 9 additions & 0 deletions tests-user/tests/build-lz-options.bats
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
# This will be run at the start of this testing suite,
# similar to beforeAll() in jest
setup() {
# Load bats-assert and bats-support
load "../lib/bats-support/load.bash"
load "../lib/bats-assert/load.bash"

# Install the binary so that we avoid race conditions
flock --verbose bats.lock npm install -g build-lz-options
}

@test "should output version" {
npx --yes build-lz-options --version
Expand Down
3 changes: 3 additions & 0 deletions tests-user/tests/create-lz-oapp.bats
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ setup() {

# Setup a directory for all the projects created by this test
PROJECTS_DIRECTORY=$(mktemp -d)

# Install the binary so that we avoid race conditions
flock --verbose bats.lock npm install -g create-lz-oapp
}

teardown() {
Expand Down
9 changes: 9 additions & 0 deletions tests-user/tests/decode-lz-options.bats
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
# This will be run at the start of this testing suite,
# similar to beforeAll() in jest
setup() {
# Load bats-assert and bats-support
load "../lib/bats-support/load.bash"
load "../lib/bats-assert/load.bash"

# Install the binary so that we avoid race conditions
flock --verbose bats.lock npm install -g decode-lz-options
}

@test "should output version" {
npx --yes decode-lz-options --version
Expand Down
3 changes: 3 additions & 0 deletions tests-user/tests/devtools-cli.bats
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ setup() {

# Setup a directory for all the projects created by this test
PROJECTS_DIRECTORY=$(mktemp -d)

# Install the binary so that we avoid race conditions
flock --verbose bats.lock npm install -g @layerzerolabs/devtools-cli
}

teardown() {
Expand Down
3 changes: 3 additions & 0 deletions tests-user/tests/devtools-evm-hardhat-export-deployments.bats
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ setup() {
# Load bats-assert and bats-support
load "../lib/bats-support/load.bash"
load "../lib/bats-assert/load.bash"

# Install the binary so that we avoid race conditions
flock --verbose bats.lock npm install -g @layerzerolabs/export-deployments
}

@test "should output version" {
Expand Down
3 changes: 3 additions & 0 deletions tests-user/tests/verify-contract.bats
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ setup() {
# Load bats-assert and bats-support
load "../lib/bats-support/load.bash"
load "../lib/bats-assert/load.bash"

# Install the binary so that we avoid race conditions
flock --verbose bats.lock npm install -g @layerzerolabs/verify-contract
}

@test "should output version" {
Expand Down

0 comments on commit c81205d

Please sign in to comment.