Skip to content

Commit

Permalink
Wrap the Polkadot API creation in a beforeAll (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
rzadp authored May 23, 2023
1 parent b37c165 commit f0a7929
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/tip.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,19 @@ const tipSizes: TipRequest["tip"]["size"][] = ["small", "medium", "large", new B

describe("tip", () => {
let state: State;
let kusamaApi: ApiPromise;
let polkadotApi: ApiPromise;

const kusamaApi = new ApiPromise({
provider: new WsProvider(getChainConfig("localkusama").providerEndpoint),
types: { Address: "AccountId", LookupSource: "AccountId" },
});
beforeAll(() => {
kusamaApi = new ApiPromise({
provider: new WsProvider(getChainConfig("localkusama").providerEndpoint),
types: { Address: "AccountId", LookupSource: "AccountId" },
});

const polkadotApi = new ApiPromise({
provider: new WsProvider(getChainConfig("localpolkadot").providerEndpoint),
types: { Address: "AccountId", LookupSource: "AccountId" },
polkadotApi = new ApiPromise({
provider: new WsProvider(getChainConfig("localpolkadot").providerEndpoint),
types: { Address: "AccountId", LookupSource: "AccountId" },
});
});

afterAll(async () => {
Expand Down

0 comments on commit f0a7929

Please sign in to comment.