diff options
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); |