Skip to content

Commit

Permalink
Fix test warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ryangoree committed Dec 18, 2024
1 parent acea457 commit 48711ef
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions packages/drift/src/adapter/MockAdapter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,10 @@ describe("MockAdapter", () => {
describe("waitForTransaction", () => {
it("Resolves to undefined by default", async () => {
const adapter = new MockAdapter();
expect(
adapter.waitForTransaction({ hash: "0x" }),
).resolves.toBeUndefined();
const result = await adapter
.waitForTransaction({ hash: "0x" })
.catch(() => "error");
expect(result).toBeUndefined();
});

it("Can be stubbed with specific params", async () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/drift/src/client/MockClient.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ describe("MockClient", () => {
describe("waitForTransaction", () => {
it("Resolves to undefined by default", async () => {
const client = new MockClient();
expect(
await expect(
client.waitForTransaction({ hash: "0x" }),
).resolves.toBeUndefined();
});
Expand Down
2 changes: 1 addition & 1 deletion packages/drift/src/client/contract/Contract.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@ describe("Contract", () => {
expect(await contract.read("symbol")).toBe("DAI");

contract.invalidateRead("symbol");
expect(contract.read("symbol")).rejects.toThrow();
await expect(contract.read("symbol")).rejects.toThrow();
});
});

0 comments on commit 48711ef

Please sign in to comment.