aboutsummaryrefslogtreecommitdiff
path: root/packages/taler-harness/src/integrationtests/test-kyc.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/taler-harness/src/integrationtests/test-kyc.ts')
-rw-r--r--packages/taler-harness/src/integrationtests/test-kyc.ts12
1 files changed, 6 insertions, 6 deletions
diff --git a/packages/taler-harness/src/integrationtests/test-kyc.ts b/packages/taler-harness/src/integrationtests/test-kyc.ts
index 915c3d470..bb40d9274 100644
--- a/packages/taler-harness/src/integrationtests/test-kyc.ts
+++ b/packages/taler-harness/src/integrationtests/test-kyc.ts
@@ -17,11 +17,7 @@
/**
* Imports.
*/
-import {
- Duration,
- j2s,
- NotificationType,
-} from "@gnu-taler/taler-util";
+import { Duration, j2s, NotificationType } from "@gnu-taler/taler-util";
import {
BankAccessApi,
BankApi,
@@ -232,7 +228,11 @@ async function runTestfakeKycService(): Promise<TestfakeKycService> {
if (path === "/oauth/v2/login") {
// Usually this would render some HTML page for the user to log in,
// but we return JSON here.
- const redirUri = new URL(qp.get("redirect_uri")!);
+ const redirUriUnparsed = qp.get("redirect_uri");
+ if (!redirUriUnparsed) {
+ throw Error("missing redirect_url");
+ }
+ const redirUri = new URL(redirUriUnparsed);
redirUri.searchParams.set("code", "code_is_ok");
res.writeHead(200, { "Content-Type": "application/json" });
res.end(