diff options
author | Florian Dold <florian.dold@gmail.com> | 2018-01-03 14:42:06 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2018-01-03 14:42:06 +0100 |
commit | fd2cd9c383b07cd681c18137396deae025d98047 (patch) | |
tree | 05de454bb6fc0fcb95b66b6ef87bcd555e81b58c /src/types-test.ts | |
parent | eb689d60aca8fc80e27ea60c4e4d7e848b01bea9 (diff) | |
download | wallet-core-fd2cd9c383b07cd681c18137396deae025d98047.tar.xz |
fix lint issues and separate message types into multiple files
Diffstat (limited to 'src/types-test.ts')
-rw-r--r-- | src/types-test.ts | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/types-test.ts b/src/types-test.ts index 3657d6d26..097235a77 100644 --- a/src/types-test.ts +++ b/src/types-test.ts @@ -14,17 +14,17 @@ TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> */ -import {test} from "ava"; -import {Amounts} from "./types"; -import * as types from "./types"; +import { test } from "ava"; +import * as Amounts from "./amounts"; +import { ContractTerms } from "./talerTypes"; -const amt = (value: number, fraction: number, currency: string): types.AmountJson => ({value, fraction, currency}); +const amt = (value: number, fraction: number, currency: string): Amounts.AmountJson => ({value, fraction, currency}); test("amount addition (simple)", (t) => { const a1 = amt(1, 0, "EUR"); const a2 = amt(1, 0, "EUR"); const a3 = amt(2, 0, "EUR"); - t.true(0 === types.Amounts.cmp(Amounts.add(a1, a2).amount, a3)); + t.true(0 === Amounts.cmp(Amounts.add(a1, a2).amount, a3)); t.pass(); }); @@ -39,7 +39,7 @@ test("amount subtraction (simple)", (t) => { const a1 = amt(2, 5, "EUR"); const a2 = amt(1, 0, "EUR"); const a3 = amt(1, 5, "EUR"); - t.true(0 === types.Amounts.cmp(Amounts.sub(a1, a2).amount, a3)); + t.true(0 === Amounts.cmp(Amounts.sub(a1, a2).amount, a3)); t.pass(); }); @@ -73,13 +73,13 @@ test("contract terms validation", (t) => { wire_method: "test", }; - types.ContractTerms.checked(c); + ContractTerms.checked(c); const c1 = JSON.parse(JSON.stringify(c)); c1.exchanges = []; try { - types.ContractTerms.checked(c1); + ContractTerms.checked(c1); } catch (e) { t.pass(); return; |