diff options
author | Florian Dold <florian.dold@gmail.com> | 2020-03-30 16:09:32 +0530 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2020-03-30 16:09:32 +0530 |
commit | aaf950e2ad5c07d4423f9822e3a0ae9f7b8d2bdf (patch) | |
tree | 9274139660f30c4857d80044eb4ac283aac1775a /src/types/types-test.ts | |
parent | 15e18440dbad55df19977a2eb7053681259afc18 (diff) | |
download | wallet-core-aaf950e2ad5c07d4423f9822e3a0ae9f7b8d2bdf.tar.xz |
re-format with prettier v2, fix HTML
Diffstat (limited to 'src/types/types-test.ts')
-rw-r--r-- | src/types/types-test.ts | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/types/types-test.ts b/src/types/types-test.ts index 67d379f7b..885371a1a 100644 --- a/src/types/types-test.ts +++ b/src/types/types-test.ts @@ -24,7 +24,7 @@ const amt = ( currency: string, ): Amounts.AmountJson => ({ value, fraction, currency }); -test("amount addition (simple)", t => { +test("amount addition (simple)", (t) => { const a1 = amt(1, 0, "EUR"); const a2 = amt(1, 0, "EUR"); const a3 = amt(2, 0, "EUR"); @@ -32,14 +32,14 @@ test("amount addition (simple)", t => { t.pass(); }); -test("amount addition (saturation)", t => { +test("amount addition (saturation)", (t) => { const a1 = amt(1, 0, "EUR"); const res = Amounts.add(amt(Amounts.maxAmountValue, 0, "EUR"), a1); t.true(res.saturated); t.pass(); }); -test("amount subtraction (simple)", t => { +test("amount subtraction (simple)", (t) => { const a1 = amt(2, 5, "EUR"); const a2 = amt(1, 0, "EUR"); const a3 = amt(1, 5, "EUR"); @@ -47,7 +47,7 @@ test("amount subtraction (simple)", t => { t.pass(); }); -test("amount subtraction (saturation)", t => { +test("amount subtraction (saturation)", (t) => { const a1 = amt(0, 0, "EUR"); const a2 = amt(1, 0, "EUR"); let res = Amounts.sub(a1, a2); @@ -57,7 +57,7 @@ test("amount subtraction (saturation)", t => { t.pass(); }); -test("amount comparison", t => { +test("amount comparison", (t) => { t.is(Amounts.cmp(amt(1, 0, "EUR"), amt(1, 0, "EUR")), 0); t.is(Amounts.cmp(amt(1, 1, "EUR"), amt(1, 0, "EUR")), 1); t.is(Amounts.cmp(amt(1, 1, "EUR"), amt(1, 2, "EUR")), -1); @@ -68,7 +68,7 @@ test("amount comparison", t => { t.pass(); }); -test("amount parsing", t => { +test("amount parsing", (t) => { t.is( Amounts.cmp(Amounts.parseOrThrow("TESTKUDOS:0"), amt(0, 0, "TESTKUDOS")), 0, @@ -117,7 +117,7 @@ test("amount parsing", t => { t.pass(); }); -test("amount stringification", t => { +test("amount stringification", (t) => { t.is(Amounts.toString(amt(0, 0, "TESTKUDOS")), "TESTKUDOS:0"); t.is(Amounts.toString(amt(4, 94000000, "TESTKUDOS")), "TESTKUDOS:4.94"); t.is(Amounts.toString(amt(0, 10000000, "TESTKUDOS")), "TESTKUDOS:0.1"); @@ -128,7 +128,7 @@ test("amount stringification", t => { t.pass(); }); -test("contract terms validation", t => { +test("contract terms validation", (t) => { const c = { nonce: "123123123", h_wire: "123", |