Skip to content

Commit

Permalink
fix: Allow CLI arguments to be passed to Solana tests
Browse files Browse the repository at this point in the history
  • Loading branch information
janjakubnanista committed Jul 30, 2024
1 parent f129f4c commit b72851b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 2 deletions.
7 changes: 7 additions & 0 deletions packages/protocol-devtools-solana/bin/test
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

if [ -z "${LZ_DEVTOOLS_ENABLE_SOLANA_TESTS}" ]; then
echo 'Solana tests can be enabled by setting LZ_DEVTOOLS_ENABLE_SOLANA_TESTS environment variable to a non-empty value'
else
jest --ci $@
fi
2 changes: 1 addition & 1 deletion packages/protocol-devtools-solana/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"dev": "$npm_execpath tsup --watch",
"lint": "$npm_execpath eslint '**/*.{js,ts,json}'",
"lint:fix": "eslint --fix '**/*.{js,ts,json}'",
"test": "if [ $(echo $LZ_DEVTOOLS_ENABLE_SOLANA_TESTS) ]; then jest --ci; else echo 'Solana tests can be enabled by setting LZ_DEVTOOLS_ENABLE_SOLANA_TESTS environment variable to a non-empty value'; fi"
"test": "./bin/test"
},
"dependencies": {
"@safe-global/api-kit": "^1.3.0",
Expand Down
7 changes: 7 additions & 0 deletions packages/ua-devtools-solana/bin/test
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env bash

if [ -z "${LZ_DEVTOOLS_ENABLE_SOLANA_TESTS}" ]; then
echo 'Solana tests can be enabled by setting LZ_DEVTOOLS_ENABLE_SOLANA_TESTS environment variable to a non-empty value'
else
jest --ci $@
fi
2 changes: 1 addition & 1 deletion packages/ua-devtools-solana/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"dev": "$npm_execpath tsup --watch",
"lint": "$npm_execpath eslint '**/*.{js,ts,json}'",
"lint:fix": "eslint --fix '**/*.{js,ts,json}'",
"test": "if [ $(echo $LZ_DEVTOOLS_ENABLE_SOLANA_TESTS) ]; then jest --ci; else echo 'Solana tests can be enabled by setting LZ_DEVTOOLS_ENABLE_SOLANA_TESTS environment variable to a non-empty value'; fi"
"test": "./bin/test"
},
"dependencies": {
"@safe-global/api-kit": "^1.3.0",
Expand Down

0 comments on commit b72851b

Please sign in to comment.