diff --git a/sdks/js/packages/spark-sdk/src/tests/integration/transfer.test.ts b/sdks/js/packages/spark-sdk/src/tests/integration/transfer.test.ts index de7dd3316..72a2000a8 100644 --- a/sdks/js/packages/spark-sdk/src/tests/integration/transfer.test.ts +++ b/sdks/js/packages/spark-sdk/src/tests/integration/transfer.test.ts @@ -20,8 +20,7 @@ import { SparkWalletTestingIntegrationWithStream, } from "../utils/spark-testing-wallet.js"; import { BitcoinFaucet } from "../utils/test-faucet.js"; - -const testLocalOnly = process.env.GITHUB_ACTIONS ? it.skip : it; +import { testHermeticAndLocalOnly } from "../isHermeticTest.js"; describe.each(walletTypes)( "Transfer with name", @@ -121,7 +120,7 @@ describe.each(walletTypes)( expect(balance.balance).toBe(1000n); }, 30000); - testLocalOnly(`${name} - test transfer with separate`, async () => { + testHermeticAndLocalOnly(`${name} - test transfer with separate`, async () => { const faucet = BitcoinFaucet.getInstance(); const options: ConfigOptions = { @@ -252,7 +251,7 @@ describe.each(walletTypes)( ); }); - testLocalOnly( + testHermeticAndLocalOnly( `${name} - test that when the receiver has tweaked the key on some SOs, we can still claim the transfer`, async () => { const faucet = BitcoinFaucet.getInstance(); diff --git a/sdks/js/packages/spark-sdk/src/tests/integration/unilateral-exit.test.ts b/sdks/js/packages/spark-sdk/src/tests/integration/unilateral-exit.test.ts index 9eb74c4ba..a65836dcf 100644 --- a/sdks/js/packages/spark-sdk/src/tests/integration/unilateral-exit.test.ts +++ b/sdks/js/packages/spark-sdk/src/tests/integration/unilateral-exit.test.ts @@ -6,6 +6,8 @@ import { Network } from "../../utils/network.js"; import { SparkWalletTestingIntegration } from "../utils/spark-testing-wallet.js"; import { BitcoinFaucet } from "../utils/test-faucet.js"; import { waitForClaim } from "../utils/utils.js"; +import { testHermeticOnly } from "../isHermeticTest.js"; + import { constructUnilateralExitFeeBumpPackages, hash160, @@ -14,7 +16,7 @@ import { signPsbtWithExternalKey } from "../utils/signing.js"; import { TreeNode } from "../../proto/spark.js"; describe("unilateral exit", () => { - it("should unilateral exit", async () => { + testHermeticOnly("should unilateral exit", async () => { const faucet = BitcoinFaucet.getInstance(); const { wallet: userWallet } = diff --git a/sdks/js/packages/spark-sdk/src/tests/isHermeticTest.ts b/sdks/js/packages/spark-sdk/src/tests/isHermeticTest.ts index 1f9bfdc7f..27db27fd7 100644 --- a/sdks/js/packages/spark-sdk/src/tests/isHermeticTest.ts +++ b/sdks/js/packages/spark-sdk/src/tests/isHermeticTest.ts @@ -1,3 +1,6 @@ export const isHermeticTest = Boolean( typeof process !== "undefined" && process?.env?.MINIKUBE_IP, ); + +export const testHermeticOnly = !isHermeticTest ? it.skip : it; +export const testHermeticAndLocalOnly = process.env.GITHUB_ACTIONS || !isHermeticTest ? it.skip : it;