diff options
author | Florian Dold <florian.dold@gmail.com> | 2016-11-03 00:47:22 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2016-11-03 00:47:22 +0100 |
commit | d0a0695fb5d34996850723f7d4b1b59c3df909c2 (patch) | |
tree | 6141a1db06f8f359813c332b3c23f3777f00b568 /lib/wallet/emscriptif-test.ts | |
parent | e9a383ede7f98512f0dd351697759d75ddb67eac (diff) |
test harness for both browser and node
Diffstat (limited to 'lib/wallet/emscriptif-test.ts')
-rw-r--r-- | lib/wallet/emscriptif-test.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/wallet/emscriptif-test.ts b/lib/wallet/emscriptif-test.ts new file mode 100644 index 000000000..a3a9229bb --- /dev/null +++ b/lib/wallet/emscriptif-test.ts @@ -0,0 +1,11 @@ +import {test, TestLib} from "testlib/talertest"; +import * as native from "./emscriptif"; + +test("string hashing", (t: TestLib) => { + let x = native.ByteArray.fromStringWithNull("hello taler"); + let h = "8RDMADB3YNF3QZBS3V467YZVJAMC2QAQX0TZGVZ6Q5PFRRAJFT70HHN0QF661QR9QWKYMMC7YEMPD679D2RADXCYK8Y669A2A5MKQFR" + let hc = x.hash().toCrock(); + console.log(`# hc ${hc}`); + t.assert(h === hc, "must equal"); + t.pass(); +}); |