Skip to content

Commit

Permalink
test: update
Browse files Browse the repository at this point in the history
  • Loading branch information
2nthony committed Nov 6, 2024
1 parent a45c5f6 commit 56d4f1c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/fetchIdentity.test.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
import { test, expect } from "vitest";
import {
fetchIdentity,
} from "../src/services/identity";
import { createFetchIdentity } from "../src/services/identity";

const fetchIdentity = createFetchIdentity();

test("fetchIdentity error", async () => {
await expect(
fetchIdentity("kusama", "15wepZh1jWNqxBjsgErm8HmYiE21n79c5krQJeTsYAjHdde")
fetchIdentity("kusama", "15wepZh1jWNqxBjsgErm8HmYiE21n79c5krQJeTsYAjHdde"),
).rejects.toThrow();
});

test("fetchIdentity success", async () => {
// Will fetch from https://id.statescan.io by default when env configuration does not exist
await expect(
fetchIdentity("kusama", "GLVeryFRbg5hEKvQZcAnLvXZEXhiYaBjzSDwrXBXrfPF7wj")
fetchIdentity("kusama", "GLVeryFRbg5hEKvQZcAnLvXZEXhiYaBjzSDwrXBXrfPF7wj"),
).resolves.toEqual({
address: "GLVeryFRbg5hEKvQZcAnLvXZEXhiYaBjzSDwrXBXrfPF7wj",
info: {
display: "RTTI-5220",
status: "VERIFIED"
}
status: "VERIFIED",
},
});
});

0 comments on commit 56d4f1c

Please sign in to comment.