From 7154d6c2703eb058817fd26869b39f2e58ee2401 Mon Sep 17 00:00:00 2001 From: Aaron Cox Date: Mon, 6 Nov 2023 12:05:57 -0800 Subject: [PATCH] Mocked account creation methods in tests --- test/tests/kit.ts | 7 +++++++ test/tests/ui.ts | 14 +++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/test/tests/kit.ts b/test/tests/kit.ts index 1e927c7..33225c0 100644 --- a/test/tests/kit.ts +++ b/test/tests/kit.ts @@ -10,6 +10,7 @@ import { Logo, Session, SessionKit, + UserInterfaceAccountCreationResponse, UserInterfaceLoginResponse, } from '$lib' @@ -594,6 +595,12 @@ suite('kit', function () { walletPluginIndex: 999999, } } + onAccountCreate(): Promise { + throw new Error('Not implemented in mock UI') + } + onAccountCreateComplete(): Promise { + throw new Error('Not implemented in mock UI') + } } const sessionKit = new SessionKit( { diff --git a/test/tests/ui.ts b/test/tests/ui.ts index 00ab729..45a8c95 100644 --- a/test/tests/ui.ts +++ b/test/tests/ui.ts @@ -3,7 +3,11 @@ import {assert} from 'chai' import type {LocaleDefinitions} from '@wharfkit/common' import {MockUserInterface} from '@wharfkit/mock-data' -import {UserInterface, UserInterfaceTranslateOptions} from 'src/ui' +import { + UserInterface, + UserInterfaceAccountCreationResponse, + UserInterfaceTranslateOptions, +} from 'src/ui' const mockLocaleDefinitions: LocaleDefinitions = { en: { @@ -34,6 +38,14 @@ class ImplementedUI extends MockUserInterface { } return this.localeDefinitions.en[key] || options?.default || `[[${key} not localized]]` } + + onAccountCreate(): Promise { + throw new Error('Not implemented in mock UI') + } + + onAccountCreateComplete(): Promise { + throw new Error('Not implemented in mock UI') + } } suite('ui', function () {