Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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 = {
Expand Down Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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 } =
Expand Down
3 changes: 3 additions & 0 deletions sdks/js/packages/spark-sdk/src/tests/isHermeticTest.ts
Original file line number Diff line number Diff line change
@@ -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;