aboutsummaryrefslogtreecommitdiff
path: root/tests.js
diff options
context:
space:
mode:
authorIan Coleman <coleman.ian@gmail.com>2016-08-23 16:32:42 +1000
committerIan Coleman <coleman.ian@gmail.com>2016-08-23 16:32:42 +1000
commitec60b6624a5f84943ffb6e6be8b3af9c2274097b (patch)
tree5bc2283780618f2efec9d759730a33cc494f997b /tests.js
parentc196ad55d911aff4458d3ae582b33fc22e06a217 (diff)
downloadBIP39-ec60b6624a5f84943ffb6e6be8b3af9c2274097b.tar.gz
BIP39-ec60b6624a5f84943ffb6e6be8b3af9c2274097b.tar.zst
BIP39-ec60b6624a5f84943ffb6e6be8b3af9c2274097b.zip
Test bip32 root key as generated from mnemonic
Diffstat (limited to 'tests.js')
-rw-r--r--tests.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests.js b/tests.js
index e534532..f5ce6d3 100644
--- a/tests.js
+++ b/tests.js
@@ -440,6 +440,31 @@ page.open(url, function(status) {
440}, 440},
441 441
442// BIP32 root key is set from phrase 442// BIP32 root key is set from phrase
443function() {
444page.open(url, function(status) {
445 // set the phrase
446 var expected = "xprv9s21ZrQH143K2jkGDCeTLgRewT9F2pH5JZs2zDmmjXes34geVnFiuNa8KTvY5WoYvdn4Ag6oYRoB6cXtc43NgJAEqDXf51xPm6fhiMCKwpi";
447 page.evaluate(function() {
448 $(".phrase").val("abandon abandon ability");
449 $(".phrase").trigger("input");
450 });
451 // check the address is generated correctly
452 setTimeout(function() {
453 var actual = page.evaluate(function() {
454 return $(".root-key").val();
455 });
456 if (actual != expected) {
457 console.log("Root key is incorrectly generated from mnemonic");
458 console.log("Expected: " + expected);
459 console.log("Actual: " + actual);
460 fail();
461 }
462 next();
463 }, 1000);
464});
465},
466
467// TODO finish these tests
443 468
444// Tabs show correct addresses when changed 469// Tabs show correct addresses when changed
445 470