[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-wallet-core] 08/13: use better testing api
From: |
gnunet |
Subject: |
[taler-wallet-core] 08/13: use better testing api |
Date: |
Fri, 21 Apr 2023 16:07:05 +0200 |
This is an automated email from the git hooks/post-receive script.
sebasjm pushed a commit to branch master
in repository wallet-core.
commit 6dcc488a2c8fd681941e5d3b62bb04af7669888e
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Fri Apr 21 10:44:33 2023 -0300
use better testing api
---
packages/merchant-backoffice-ui/package.json | 2 +-
packages/merchant-backoffice-ui/src/stories.test.ts | 9 ++-------
2 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/packages/merchant-backoffice-ui/package.json
b/packages/merchant-backoffice-ui/package.json
index ad7d2eb02..dc5668933 100644
--- a/packages/merchant-backoffice-ui/package.json
+++ b/packages/merchant-backoffice-ui/package.json
@@ -9,7 +9,7 @@
"check": "tsc",
"compile": "tsc && ./build.mjs",
"dev": "preact watch --port ${PORT:=8080} --no-sw --no-esm",
- "test": "pnpm compile && mocha --require source-map-support/register
'dist/**/*.test.js' 'dist/**/test.js'",
+ "test": "mocha --require source-map-support/register 'dist/**/*.test.js'
'dist/**/test.js'",
"lint": "eslint 'src/**/*.{js,jsx,ts,tsx}'",
"i18n:extract": "pogen extract",
"i18n:merge": "pogen merge",
diff --git a/packages/merchant-backoffice-ui/src/stories.test.ts
b/packages/merchant-backoffice-ui/src/stories.test.ts
index e85be31b7..df732895f 100644
--- a/packages/merchant-backoffice-ui/src/stories.test.ts
+++ b/packages/merchant-backoffice-ui/src/stories.test.ts
@@ -19,7 +19,7 @@
* @author Sebastian Javier Marchano (sebasjm)
*/
import { setupI18n } from "@gnu-taler/taler-util";
-import { parseGroupImport } from "@gnu-taler/web-util/lib/index.browser";
+import { parseGroupImport, tests } from
"@gnu-taler/web-util/lib/index.browser";
import { h as create } from "preact";
import { render as renderToString } from "preact-render-to-string";
import * as admin from "./paths/admin/index.stories.js";
@@ -35,12 +35,7 @@ describe("All the examples:", () => {
describe(`Component: ${component.name}`, () => {
component.examples.forEach((example) => {
it(`should render example: ${example.name}`, () => {
- const vdom = create(
- example.render.component,
- example.render.props,
- );
- const html = renderToString(vdom);
- // console.log(html)
+ tests.renderUI(example.render);
});
});
});
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-wallet-core] branch master updated (45bbe7ba1 -> fc2adae6b), gnunet, 2023/04/21
- [taler-wallet-core] 02/13: moving libs to web utils, apply new mock api to backoffice, gnunet, 2023/04/21
- [taler-wallet-core] 01/13: better swr mocks, gnunet, 2023/04/21
- [taler-wallet-core] 03/13: test file end with -test.js, gnunet, 2023/04/21
- [taler-wallet-core] 04/13: running all tests in sequential mode, otherwise it will fail (maybe ava can't run in parallel?), gnunet, 2023/04/21
- [taler-wallet-core] 06/13: allow the example to add params to the testing context, gnunet, 2023/04/21
- [taler-wallet-core] 08/13: use better testing api,
gnunet <=
- [taler-wallet-core] 05/13: fix bulid, gnunet, 2023/04/21
- [taler-wallet-core] 09/13: integrate anastasis to the web-utils testing api, gnunet, 2023/04/21
- [taler-wallet-core] 10/13: integrate to the web util testing api, gnunet, 2023/04/21
- [taler-wallet-core] 07/13: render hook and render ui are not the same function (node and browser), gnunet, 2023/04/21
- [taler-wallet-core] 13/13: props types should be exported for tests, gnunet, 2023/04/21
- [taler-wallet-core] 12/13: tsc ask to export type from web-util, gnunet, 2023/04/21
- [taler-wallet-core] 11/13: remove old testing function, use web-utils, gnunet, 2023/04/21