aboutsummaryrefslogtreecommitdiff
path: root/packages/anastasis-webui/src/test-utils.ts
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2022-12-06 11:21:12 -0300
committerSebastian <sebasjm@gmail.com>2022-12-06 11:21:12 -0300
commitd3a6544bc5fd7b3d2d65494ba1c3155b024a436e (patch)
tree8e66fcbd9f1ae79fa5d9288af70a827caedb2c91 /packages/anastasis-webui/src/test-utils.ts
parente382b022030db96b8282337b304ec5e599a5f405 (diff)
downloadwallet-core-d3a6544bc5fd7b3d2d65494ba1c3155b024a436e.tar.xz
using web-utils in anastasis-webui
Diffstat (limited to 'packages/anastasis-webui/src/test-utils.ts')
-rw-r--r--packages/anastasis-webui/src/test-utils.ts12
1 files changed, 8 insertions, 4 deletions
diff --git a/packages/anastasis-webui/src/test-utils.ts b/packages/anastasis-webui/src/test-utils.ts
index 1fcc753ee..f220540f1 100644
--- a/packages/anastasis-webui/src/test-utils.ts
+++ b/packages/anastasis-webui/src/test-utils.ts
@@ -41,8 +41,10 @@ export function createExample<Props>(
// check how we can build evaluatedProps in render time
const evaluatedProps = typeof props === "function" ? props() : props;
const Render = (args: any): VNode => create(Component, args);
- Render.args = evaluatedProps;
- return Render;
+ return {
+ component: Render,
+ props: evaluatedProps
+ };
}
export function createExampleWithCustomContext<Props, ContextProps>(
@@ -58,8 +60,10 @@ export function createExampleWithCustomContext<Props, ContextProps>(
...contextProps,
children: [Render(args)],
} as any);
- WithContext.args = evaluatedProps;
- return WithContext;
+ return {
+ component: WithContext,
+ props: evaluatedProps
+ };
}
export function NullLink({