diff options
author | Florian Dold <florian.dold@gmail.com> | 2019-07-31 01:33:56 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2019-07-31 01:33:56 +0200 |
commit | cc4e8ddc85d36f29a7385a7f4eb08c77f46b3af6 (patch) | |
tree | 56b7d5a083c5b64a72d0905ad04616b97986538e /src/crypto/emscInterface-test.ts | |
parent | bcefbd7aab5f33f93d626c6421a1a1218c1a91a2 (diff) | |
download | wallet-core-cc4e8ddc85d36f29a7385a7f4eb08c77f46b3af6.tar.xz |
headless wallet WIP
Diffstat (limited to 'src/crypto/emscInterface-test.ts')
-rw-r--r-- | src/crypto/emscInterface-test.ts | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/crypto/emscInterface-test.ts b/src/crypto/emscInterface-test.ts index 58d83e6fe..305e50ff4 100644 --- a/src/crypto/emscInterface-test.ts +++ b/src/crypto/emscInterface-test.ts @@ -17,8 +17,14 @@ // tslint:disable:max-line-length import test from "ava"; +import * as emscLoader from "./emscLoader"; import * as native from "./emscInterface"; +test.before(async () => { + const { lib } = await emscLoader.getLib(); + native.initialize(lib); +}); + test("string hashing", (t) => { const x = native.ByteArray.fromStringWithNull("hello taler"); const h = "8RDMADB3YNF3QZBS3V467YZVJAMC2QAQX0TZGVZ6Q5PFRRAJFT70HHN0QF661QR9QWKYMMC7YEMPD679D2RADXCYK8Y669A2A5MKQFR"; @@ -99,7 +105,7 @@ test("withdraw-request", (t) => { }); -test("withdraw-request", (t) => { +test("currency-conversion", (t) => { const a1 = new native.Amount({currency: "KUDOS", value: 1, fraction: 50000000}); const a2 = new native.Amount({currency: "KUDOS", value: 1, fraction: 50000000}); a1.add(a2); |