taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit c239967813be8a65d649e4cadd4d531fd4e4990d
parent 50379a1d5b89822dd32618c32433cf12d1a1779e
Author: Sebastian <sebasjm@gmail.com>
Date:   Fri, 24 Jun 2022 12:32:37 -0300

fix tests

Diffstat:
Mpackages/anastasis-webui/src/main.test.ts | 9+++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/packages/anastasis-webui/src/main.test.ts b/packages/anastasis-webui/src/main.test.ts @@ -24,8 +24,8 @@ import * as pages from "./pages/home/index.storiesNo.js"; setupI18n("en", { en: {} }); -function testThisStory(st: any): any { - describe(`render examples for ${(st as any).default.title}`, () => { +function testThisStory(key: string, st: any): any { + describe(`render examples for ${key}`, () => { Object.keys(st).forEach((k) => { const Component = (st as any)[k]; if (k === "default" || !Component) return; @@ -38,11 +38,12 @@ function testThisStory(st: any): any { } describe("render every storybook example", () => { - [pages].forEach(function testAll(st: any) { + Object.entries(pages).forEach(function testAll([key, value]) { + const st: any = value; if (Array.isArray(st.default)) { st.default.forEach(testAll); } else { - testThisStory(st); + testThisStory(key, st); } }); });