From 56d4f1c5e12da0d83a64a97e84c16f559d874939 Mon Sep 17 00:00:00 2001 From: 2nthony Date: Wed, 6 Nov 2024 18:57:21 +0800 Subject: [PATCH] test: update --- test/fetchIdentity.test.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/fetchIdentity.test.js b/test/fetchIdentity.test.js index 934004f..219df9e 100644 --- a/test/fetchIdentity.test.js +++ b/test/fetchIdentity.test.js @@ -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", + }, }); });