summaryrefslogtreecommitdiff
path: root/src/util/taleruri-test.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-03-30 16:09:32 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-03-30 16:09:32 +0530
commitaaf950e2ad5c07d4423f9822e3a0ae9f7b8d2bdf (patch)
tree9274139660f30c4857d80044eb4ac283aac1775a /src/util/taleruri-test.ts
parent15e18440dbad55df19977a2eb7053681259afc18 (diff)
downloadwallet-core-aaf950e2ad5c07d4423f9822e3a0ae9f7b8d2bdf.tar.gz
wallet-core-aaf950e2ad5c07d4423f9822e3a0ae9f7b8d2bdf.tar.bz2
wallet-core-aaf950e2ad5c07d4423f9822e3a0ae9f7b8d2bdf.zip
re-format with prettier v2, fix HTML
Diffstat (limited to 'src/util/taleruri-test.ts')
-rw-r--r--src/util/taleruri-test.ts50
1 files changed, 25 insertions, 25 deletions
diff --git a/src/util/taleruri-test.ts b/src/util/taleruri-test.ts
index 052581a91..9efc1846d 100644
--- a/src/util/taleruri-test.ts
+++ b/src/util/taleruri-test.ts
@@ -22,7 +22,7 @@ import {
parseTipUri,
} from "./taleruri";
-test("taler pay url parsing: wrong scheme", t => {
+test("taler pay url parsing: wrong scheme", (t) => {
const url1 = "talerfoo://";
const r1 = parsePayUri(url1);
t.is(r1, undefined);
@@ -32,7 +32,7 @@ test("taler pay url parsing: wrong scheme", t => {
t.is(r2, undefined);
});
-test("taler pay url parsing: defaults", t => {
+test("taler pay url parsing: defaults", (t) => {
const url1 = "taler://pay/example.com/-/-/myorder";
const r1 = parsePayUri(url1);
if (!r1) {
@@ -52,7 +52,7 @@ test("taler pay url parsing: defaults", t => {
t.is(r2.sessionId, "mysession");
});
-test("taler pay url parsing: trailing parts", t => {
+test("taler pay url parsing: trailing parts", (t) => {
const url1 = "taler://pay/example.com/-/-/myorder/mysession/spam/eggs";
const r1 = parsePayUri(url1);
if (!r1) {
@@ -63,7 +63,7 @@ test("taler pay url parsing: trailing parts", t => {
t.is(r1.sessionId, "mysession");
});
-test("taler pay url parsing: instance", t => {
+test("taler pay url parsing: instance", (t) => {
const url1 = "taler://pay/example.com/-/myinst/myorder";
const r1 = parsePayUri(url1);
if (!r1) {
@@ -74,7 +74,7 @@ test("taler pay url parsing: instance", t => {
t.is(r1.orderId, "myorder");
});
-test("taler pay url parsing: path prefix and instance", t => {
+test("taler pay url parsing: path prefix and instance", (t) => {
const url1 = "taler://pay/example.com/mypfx/myinst/myorder";
const r1 = parsePayUri(url1);
if (!r1) {
@@ -84,7 +84,7 @@ test("taler pay url parsing: path prefix and instance", t => {
t.is(r1.merchantBaseUrl, "https://example.com/mypfx/instances/myinst/");
});
-test("taler pay url parsing: complex path prefix", t => {
+test("taler pay url parsing: complex path prefix", (t) => {
const url1 = "taler://pay/example.com/mypfx%2Fpublic/-/myorder";
const r1 = parsePayUri(url1);
if (!r1) {
@@ -96,7 +96,7 @@ test("taler pay url parsing: complex path prefix", t => {
t.is(r1.sessionId, undefined);
});
-test("taler pay uri parsing: complex path prefix and instance", t => {
+test("taler pay uri parsing: complex path prefix and instance", (t) => {
const url1 = "taler://pay/example.com/mypfx%2Fpublic/foo/myorder";
const r1 = parsePayUri(url1);
if (!r1) {
@@ -107,29 +107,29 @@ test("taler pay uri parsing: complex path prefix and instance", t => {
t.is(r1.orderId, "myorder");
});
-test("taler refund uri parsing: non-https #1", t => {
+test("taler refund uri parsing: non-https #1", (t) => {
const url1 = "taler://refund/example.com/-/-/myorder?insecure=1";
const r1 = parseRefundUri(url1);
if (!r1) {
t.fail();
return;
- }
+ }
t.is(r1.merchantBaseUrl, "http://example.com/public/");
- t.is(r1.orderId, "myorder")
+ t.is(r1.orderId, "myorder");
});
-test("taler pay uri parsing: non-https #1", t => {
+test("taler pay uri parsing: non-https #1", (t) => {
const url1 = "taler://pay/example.com/-/-/myorder?insecure=1";
const r1 = parsePayUri(url1);
if (!r1) {
t.fail();
return;
- }
+ }
t.is(r1.merchantBaseUrl, "http://example.com/public/");
- t.is(r1.orderId, "myorder")
+ t.is(r1.orderId, "myorder");
});
-test("taler pay url parsing: non-https #2", t => {
+test("taler pay url parsing: non-https #2", (t) => {
const url1 = "taler://pay/example.com/-/-/myorder?insecure=2";
const r1 = parsePayUri(url1);
if (!r1) {
@@ -140,7 +140,7 @@ test("taler pay url parsing: non-https #2", t => {
t.is(r1.orderId, "myorder");
});
-test("taler withdraw uri parsing", t => {
+test("taler withdraw uri parsing", (t) => {
const url1 = "taler://withdraw/bank.example.com/-/12345";
const r1 = parseWithdrawUri(url1);
if (!r1) {
@@ -150,7 +150,7 @@ test("taler withdraw uri parsing", t => {
t.is(r1.statusUrl, "https://bank.example.com/api/withdraw-operation/12345");
});
-test("taler refund uri parsing", t => {
+test("taler refund uri parsing", (t) => {
const url1 = "taler://refund/merchant.example.com/-/-/1234";
const r1 = parseRefundUri(url1);
if (!r1) {
@@ -161,7 +161,7 @@ test("taler refund uri parsing", t => {
t.is(r1.orderId, "1234");
});
-test("taler refund uri parsing with instance", t => {
+test("taler refund uri parsing with instance", (t) => {
const url1 = "taler://refund/merchant.example.com/-/myinst/1234";
const r1 = parseRefundUri(url1);
if (!r1) {
@@ -169,23 +169,23 @@ test("taler refund uri parsing with instance", t => {
return;
}
t.is(r1.orderId, "1234");
- t.is(r1.merchantBaseUrl, "https://merchant.example.com/public/instances/myinst/");
+ t.is(
+ r1.merchantBaseUrl,
+ "https://merchant.example.com/public/instances/myinst/",
+ );
});
-test("taler tip pickup uri", t => {
+test("taler tip pickup uri", (t) => {
const url1 = "taler://tip/merchant.example.com/-/-/tipid";
const r1 = parseTipUri(url1);
if (!r1) {
t.fail();
return;
}
- t.is(
- r1.merchantBaseUrl,
- "https://merchant.example.com/public/",
- );
+ t.is(r1.merchantBaseUrl, "https://merchant.example.com/public/");
});
-test("taler tip pickup uri with instance", t => {
+test("taler tip pickup uri with instance", (t) => {
const url1 = "taler://tip/merchant.example.com/-/tipm/tipid";
const r1 = parseTipUri(url1);
if (!r1) {
@@ -199,7 +199,7 @@ test("taler tip pickup uri with instance", t => {
t.is(r1.merchantTipId, "tipid");
});
-test("taler tip pickup uri with instance and prefix", t => {
+test("taler tip pickup uri with instance and prefix", (t) => {
const url1 = "taler://tip/merchant.example.com/my%2fpfx/tipm/tipid";
const r1 = parseTipUri(url1);
if (!r1) {