diff options
author | Sebastian <sebasjm@gmail.com> | 2023-05-24 10:16:00 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2023-05-24 10:21:06 -0300 |
commit | 99e248d88697b44b12bd599d8a40983f8fd1539a (patch) | |
tree | 866c7e99fde66c9ccdedc124f423b948a9adc649 /packages | |
parent | 28b8f2eaf9417b26320805b69b580756de0bcecd (diff) | |
download | wallet-core-99e248d88697b44b12bd599d8a40983f8fd1539a.tar.xz |
fix test merchant anastasis
Diffstat (limited to 'packages')
-rwxr-xr-x | packages/anastasis-webui/dev.mjs | 5 | ||||
-rw-r--r-- | packages/anastasis-webui/package.json | 2 | ||||
-rwxr-xr-x | packages/anastasis-webui/test.mjs | 29 |
3 files changed, 32 insertions, 4 deletions
diff --git a/packages/anastasis-webui/dev.mjs b/packages/anastasis-webui/dev.mjs index f5f66c77f..32f380e86 100755 --- a/packages/anastasis-webui/dev.mjs +++ b/packages/anastasis-webui/dev.mjs @@ -16,10 +16,9 @@ */ import { serve } from "@gnu-taler/web-util/node"; -import { initializeDev, getFilesInDirectory } from "@gnu-taler/web-util/build"; +import { initializeDev } from "@gnu-taler/web-util/build"; -const allTestFiles = getFilesInDirectory("src", /.test.tsx?$/); -const devEntryPoints = ["src/stories.tsx", "src/index.ts", ...allTestFiles]; +const devEntryPoints = ["src/stories.tsx", "src/index.ts"]; const build = initializeDev({ source: { diff --git a/packages/anastasis-webui/package.json b/packages/anastasis-webui/package.json index 69707b137..00afa9d41 100644 --- a/packages/anastasis-webui/package.json +++ b/packages/anastasis-webui/package.json @@ -10,7 +10,7 @@ "dev": "./dev.mjs", "prepare": "pnpm compile", "lint": "eslint 'src/**/*.{js,jsx,ts,tsx}'", - "test": "mocha --require source-map-support/register --enable-source-maps 'dist/**/*test.js'", + "test": "./test.mjs && mocha --require source-map-support/register --enable-source-maps 'dist/**/*test.js'", "pretty": "prettier --write src" }, "dependencies": { diff --git a/packages/anastasis-webui/test.mjs b/packages/anastasis-webui/test.mjs new file mode 100755 index 000000000..746c053cb --- /dev/null +++ b/packages/anastasis-webui/test.mjs @@ -0,0 +1,29 @@ +#!/usr/bin/env node +/* + This file is part of GNU Anastasis + (C) 2021-2022 Anastasis SARL + + GNU Anastasis is free software; you can redistribute it and/or modify it under the + terms of the GNU Affero General Public License as published by the Free Software + Foundation; either version 3, or (at your option) any later version. + + GNU Anastasis is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License along with + GNU Anastasis; see the file COPYING. If not, see <http://www.gnu.org/licenses/> + */ +import { build } from "@gnu-taler/web-util/build"; +import { getFilesInDirectory } from "@gnu-taler/web-util/build"; + +const allTestFiles = getFilesInDirectory("src", /.test.tsx?$/); + +await build({ + source: { + js: allTestFiles, + assets: ["src/index.html"], + }, + destination: "./dist/prod", + css: "sass", +}); |