From b72851b046ba302b66f22159e21b9d331932d007 Mon Sep 17 00:00:00 2001 From: Jan Nanista Date: Tue, 30 Jul 2024 11:52:27 -0700 Subject: [PATCH] fix: Allow CLI arguments to be passed to Solana tests --- packages/protocol-devtools-solana/bin/test | 7 +++++++ packages/protocol-devtools-solana/package.json | 2 +- packages/ua-devtools-solana/bin/test | 7 +++++++ packages/ua-devtools-solana/package.json | 2 +- 4 files changed, 16 insertions(+), 2 deletions(-) create mode 100755 packages/protocol-devtools-solana/bin/test create mode 100755 packages/ua-devtools-solana/bin/test diff --git a/packages/protocol-devtools-solana/bin/test b/packages/protocol-devtools-solana/bin/test new file mode 100755 index 000000000..dde420266 --- /dev/null +++ b/packages/protocol-devtools-solana/bin/test @@ -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 \ No newline at end of file diff --git a/packages/protocol-devtools-solana/package.json b/packages/protocol-devtools-solana/package.json index 3cbcf4ecd..7e2fb8317 100644 --- a/packages/protocol-devtools-solana/package.json +++ b/packages/protocol-devtools-solana/package.json @@ -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", diff --git a/packages/ua-devtools-solana/bin/test b/packages/ua-devtools-solana/bin/test new file mode 100755 index 000000000..dde420266 --- /dev/null +++ b/packages/ua-devtools-solana/bin/test @@ -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 \ No newline at end of file diff --git a/packages/ua-devtools-solana/package.json b/packages/ua-devtools-solana/package.json index f2c4cc27a..f7a39a9ec 100644 --- a/packages/ua-devtools-solana/package.json +++ b/packages/ua-devtools-solana/package.json @@ -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",