Skip to content

Commit 4c4ca5b

Browse files
committed
Step 6: setting up the testing environment
1 parent 34d403b commit 4c4ca5b

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

tests/solana-hello-world.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
11
import * as anchor from "@project-serum/anchor";
22
import { Program } from "@project-serum/anchor";
33
import { SolanaHelloWorld } from "../target/types/solana_hello_world";
4+
import * as assert from "assert";
45

56
describe("solana-hello-world", () => {
6-
// Configure the client to use the local cluster.
7-
anchor.setProvider(anchor.AnchorProvider.env());
7+
const provider = anchor.AnchorProvider.env();
8+
anchor.setProvider(provider);
89

9-
const program = anchor.workspace.SolanaHelloWorld as Program<SolanaHelloWorld>;
10-
11-
it("Is initialized!", async () => {
12-
// Add your test here.
13-
const tx = await program.methods.initialize().rpc();
14-
console.log("Your transaction signature", tx);
15-
});
10+
const program = anchor.workspace
11+
.SolanaHelloWorld as Program<SolanaHelloWorld>;
1612
});

0 commit comments

Comments
 (0)