Skip to content

Commit 4c7f36b

Browse files
committed
refactor: update hello-solana Anchor test file to use type-only imports and clearer suite descriptions
1 parent 42bd0ce commit 4c7f36b

File tree

1 file changed

+14
-14
lines changed
  • basics/hello-solana/anchor/tests

1 file changed

+14
-14
lines changed
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
import * as anchor from '@coral-xyz/anchor';
2-
import { HelloSolana } from '../target/types/hello_solana';
1+
import * as anchor from "@coral-xyz/anchor";
2+
import type { HelloSolana } from "../target/types/hello_solana.ts";
33

4-
describe('hello-solana', () => {
5-
// Configure the Anchor provider & load the program IDL
6-
// The IDL gives you a typescript module
7-
//
8-
const provider = anchor.AnchorProvider.env();
9-
anchor.setProvider(provider);
10-
const program = anchor.workspace.HelloSolana as anchor.Program<HelloSolana>;
4+
describe("Anchor: hello-solana", () => {
5+
// Configure the Anchor provider & load the program IDL
6+
// The IDL gives you a typescript module
7+
//
8+
const provider = anchor.AnchorProvider.env();
9+
anchor.setProvider(provider);
10+
const program = anchor.workspace.HelloSolana as anchor.Program<HelloSolana>;
1111

12-
it('Say hello!', async () => {
13-
// Just run Anchor's IDL method to build a transaction!
14-
//
15-
await program.methods.hello().accounts({}).rpc();
16-
});
12+
it("Say hello!", async () => {
13+
// Just run Anchor's IDL method to build a transaction!
14+
//
15+
await program.methods.hello().accounts({}).rpc();
16+
});
1717
});

0 commit comments

Comments
 (0)