Skip to content

Commit 0077bf1

Browse files
committed
add with json to bankrun tests
1 parent 3c8490b commit 0077bf1

File tree

26 files changed

+31
-28
lines changed

26 files changed

+31
-28
lines changed

basics/account-data/anchor/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@
1313
"mocha": "^9.0.3",
1414
"ts-mocha": "^10.0.0",
1515
"typescript": "^4.3.5"
16-
}
16+
},
17+
"type": "module"
1718
}

basics/account-data/anchor/tests/bankrun.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { BankrunProvider } from "anchor-bankrun";
55
import { startAnchor } from "solana-bankrun";
66
import type { AnchorProgramExample } from "../target/types/anchor_program_example";
77

8-
import IDL from "../target/idl/anchor_program_example.json";
8+
import IDL from "../target/idl/anchor_program_example.json" with { type: "json" };
99
const PROGRAM_ID = new PublicKey(IDL.address);
1010

1111
describe("Account Data!", async () => {

basics/checking-accounts/anchor/tests/bankrun.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { BankrunProvider } from "anchor-bankrun";
1010
import { startAnchor } from "solana-bankrun";
1111
import type { AnchorProgramExample } from "../target/types/anchor_program_example";
1212

13-
import IDL from "../target/idl/anchor_program_example.json";
13+
import IDL from "../target/idl/anchor_program_example.json" with { type: "json" };
1414
const PROGRAM_ID = new PublicKey(IDL.address);
1515

1616
describe("Bankrun example", async () => {

basics/close-account/anchor/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@
1717
"mocha": "^9.0.3",
1818
"ts-mocha": "^10.0.0",
1919
"typescript": "^4.3.5"
20-
}
20+
},
21+
"type": "module"
2122
}

basics/close-account/anchor/tests/bankrun.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { BankrunProvider } from "anchor-bankrun";
66
import { startAnchor } from "solana-bankrun";
77
import type { CloseAccountProgram } from "../target/types/close_account_program";
88

9-
import IDL from "../target/idl/close_account_program.json";
9+
import IDL from "../target/idl/close_account_program.json" with { type: "json" };
1010
const PROGRAM_ID = new PublicKey(IDL.address);
1111

1212
describe("close-an-account", async () => {

basics/counter/anchor/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,6 @@
1818
"prettier": "^2.6.2",
1919
"ts-mocha": "^10.0.0",
2020
"typescript": "^4.3.5"
21-
}
21+
},
22+
"type": "module"
2223
}

basics/counter/anchor/tests/bankrun.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { assert } from "chai";
66
import { startAnchor } from "solana-bankrun";
77
import type { CounterAnchor } from "../target/types/counter_anchor";
88

9-
import IDL from "../target/idl/counter_anchor.json";
9+
import IDL from "../target/idl/counter_anchor.json" with { type: "json" };
1010
const PROGRAM_ID = new PublicKey(IDL.address);
1111

1212
describe("counter_anchor", async () => {

basics/create-account/anchor/tests/bankrun.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { assert } from "chai";
66
import { startAnchor } from "solana-bankrun";
77
import type { CreateSystemAccount } from "../target/types/create_system_account";
88

9-
import IDL from "../target/idl/create_system_account.json";
9+
import IDL from "../target/idl/create_system_account.json" with { type: "json" };
1010
const PROGRAM_ID = new PublicKey(IDL.address);
1111

1212
describe("Create a system account", async () => {

basics/cross-program-invocation/anchor/tests/bankrun.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import { startAnchor } from 'solana-bankrun';
66
import type { Hand } from '../target/types/hand';
77
import type { Lever } from '../target/types/lever';
88

9-
import { IDL as HAND_IDL } from "../target/idl/hand.json";
10-
import { IDL as LEVER_IDL } from "../target/idl/lever.json";
9+
import { IDL as HAND_IDL } from "../target/idl/hand.json" with { type: "json" };
10+
import { IDL as LEVER_IDL } from "../target/idl/lever.json" with { type: "json" };
1111
const HAND_PROGRAM_ID = new PublicKey(HAND_IDL.address);
1212
const LEVER_PROGRAM_ID = new PublicKey(LEVER_IDL.address);
1313

basics/hello-solana/anchor/tests/bankrun.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { BankrunProvider } from "anchor-bankrun";
55
import { startAnchor } from "solana-bankrun";
66
import { HelloSolana } from "../target/types/hello_solana";
77

8-
import IDL from "../target/idl/hello_solana.json";
8+
import IDL from "../target/idl/hello_solana.json" with { type: "json" };
99
const PROGRAM_ID = new PublicKey(IDL.address);
1010

1111
describe("hello-solana", async () => {

0 commit comments

Comments
 (0)