From 831eb1f4e93b45214224f5951df39e7ff05af01b Mon Sep 17 00:00:00 2001 From: Vadim Fadeev Date: Thu, 24 Oct 2024 11:25:40 +0100 Subject: [PATCH] feat: add run tests --- Anchor.toml | 4 ++-- package.json | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Anchor.toml b/Anchor.toml index a0df19f..1d2370d 100644 --- a/Anchor.toml +++ b/Anchor.toml @@ -13,7 +13,7 @@ url = "https://api.apr.dev" [provider] cluster = "Localnet" -wallet = "usb://ledger" +wallet = "~/.config/solana/id.json" [scripts] test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 test/tests/**/*.ts" @@ -25,7 +25,7 @@ upgradeable = false [test.validator] bind_address = "0.0.0.0" -url = "https://api.mainnet-beta.solana.com" +url = "https://api.devnet.solana.com" ledger = ".anchor/test-ledger" rpc_port = 8899 diff --git a/package.json b/package.json index 58645af..c3b3012 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "build-interfaces": "cd packages/libreplex-idls && yarn package && yarn build && cd .. && cd libreplex-sdk && yarn build && cd ../..", "build": "lerna run clean && lerna run build", "libre-cli": "ts-node src/cli/index.ts", + "test": "anchor test", "libreplex_editions:deploy-dev:solana-dev-net": "anchor build -p libreplex_editions && anchor deploy -p libreplex_editions --provider.cluster https://api.devnet.solana.com --provider.wallet ~/.config/solana/id.json", "libreplex_editions_controls:deploy-dev:solana-dev-net": "anchor build -p libreplex_editions_controls && anchor deploy -p libreplex_editions_controls --provider.cluster https://api.devnet.solana.com --provider.wallet ~/.config/solana/id.json",