taler-typescript-core

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

commit 50e99b62e03e828d60b724f307b2b5bf97468e49
parent 522d7a68b9fb873f2e254002a3c16d274b7584f5
Author: Florian Dold <dold@taler.net>
Date:   Tue, 21 Jul 2026 02:37:46 +0200

util: test that the wallet-transactions module loads standalone

Diffstat:
Apackages/taler-util/src/module-isolation.test.ts | 26++++++++++++++++++++++++++
1 file changed, 26 insertions(+), 0 deletions(-)

diff --git a/packages/taler-util/src/module-isolation.test.ts b/packages/taler-util/src/module-isolation.test.ts @@ -0,0 +1,26 @@ +/* + This file is part of GNU Taler + (C) 2024 Taler Systems S.A. + + GNU Taler is free software; you can redistribute it and/or modify it under the + terms of the GNU General Public License as published by the Free Software + Foundation; either version 3, or (at your option) any later version. + + GNU Taler 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 General Public License for more details. + + You should have received a copy of the GNU General Public License along with + GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> + */ + +import { test } from "node:test"; +import assert from "node:assert"; + +test("types-taler-wallet-transactions loads without the package barrel", async (t) => { + // Regression: a circular dependency through ./index.js used to crash this + // module at load time whenever it, rather than the barrel, was the entry + // point -- as happens when node runs a single test file in its own process. + const mod = await import("./types-taler-wallet-transactions.js"); + assert.strictEqual(typeof mod.codecForTransactionsRequest, "function"); +});