taler-typescript-core

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

commit 595d18a63409d3cbee85edb7b97e02072f48dfdc
parent ac10ca42df0ba80f2bccabac01a0722c6807e1d1
Author: Florian Dold <dold@taler.net>
Date:   Tue, 21 Jul 2026 19:59:56 +0200

util: make the path recursion test exercise the recursion guard

The test set [foo]/x but asked for [foo]/a, so it passed on a
missing-option error and would have passed with the guard removed.

Diffstat:
Mpackages/taler-util/src/talerconfig.test.ts | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/packages/taler-util/src/talerconfig.test.ts b/packages/taler-util/src/talerconfig.test.ts @@ -121,9 +121,11 @@ test("recursive path resolution", (t) => { config.setString("paths", "a", "x${b}"); config.setString("paths", "b", "y${a}"); config.setString("foo", "x", "z${a}"); + // Match the message too: asserting only that something throws let this + // test pass on a missing-option error instead of the recursion guard. assert.throws(() => { - config.getPath("foo", "a").required(); - }); + config.getPath("foo", "x").required(); + }, /recursion in path substitution/); }); test("a config file with CRLF line endings loads", (t) => {