Skip to content

Commit

Permalink
fix: web integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tomyrd committed Dec 4, 2024
1 parent b44f79b commit 7c8fe96
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
11 changes: 5 additions & 6 deletions crates/web-client/test/account.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,8 @@ describe("get_account tests", () => {

it("returns error attempting to retrieve a non-existing account", async () => {
const result = await getAccountNoMatch();
const expectedErrorMessage = `Failed to get account: Store error: Account data was not found for Account Id ${result.nonExistingAccountId}`;

expect(result.errorMessage).to.equal(expectedErrorMessage);
expect(result.errorMessage).to.match(/Failed to get account:/);
});
});

Expand Down Expand Up @@ -225,9 +224,8 @@ describe("get_account_auth tests", () => {

it("returns error attempting to retrieve a non-existing account auth", async () => {
const result = await getAccountAuthNoMatch();
const expectedErrorMessage = `Failed to get account auth: Store error: Account data was not found for Account Id ${result.nonExistingAccountId}`;

expect(result.errorMessage).to.equal(expectedErrorMessage);
expect(result.errorMessage).to.match(/Failed to get account auth:/);
});
});

Expand Down Expand Up @@ -303,8 +301,9 @@ describe("fetch_and_cache_account_auth_by_pub_key tests", () => {

it("returns error attempting to retrieve/cache a non-existing account auth", async () => {
const result = await fetchAndCacheAccountAuthByPubKeyNoMatch();
const expectedErrorMessage = `Failed to fetch and cache account auth: Account data was not found for Account Id ${result.nonExistingAccountId}`;

expect(result.errorMessage).to.equal(expectedErrorMessage);
expect(result.errorMessage).to.match(
/Failed to fetch and cache account auth:/
);
});
});
2 changes: 1 addition & 1 deletion crates/web-client/test/transactions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ describe("compile_tx_script tests", () => {
const script = "fakeScript";

await expect(compileTxScript(script)).to.be.rejectedWith(
/Failed to compile transaction script: Transaction script error:(.|\n)*/
/Failed to compile transaction script:/
);
});
});

0 comments on commit 7c8fe96

Please sign in to comment.