aboutsummaryrefslogtreecommitdiff
path: root/tests.js
diff options
context:
space:
mode:
authorIan Coleman <coleman.ian@gmail.com>2016-08-23 20:03:52 +1000
committerIan Coleman <coleman.ian@gmail.com>2016-08-23 20:03:52 +1000
commit048bc3e000567b0f54cbaaa8d4f6567051db2555 (patch)
treef637bc2d3cc13f84763714086ea162c0cb0c97da /tests.js
parent9eb72cdfcf76cd6f8b57409f322e3c4e83ffdeec (diff)
downloadBIP39-048bc3e000567b0f54cbaaa8d4f6567051db2555.tar.gz
BIP39-048bc3e000567b0f54cbaaa8d4f6567051db2555.tar.zst
BIP39-048bc3e000567b0f54cbaaa8d4f6567051db2555.zip
Test BIP44 account field
Diffstat (limited to 'tests.js')
-rw-r--r--tests.js33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests.js b/tests.js
index c6fa594..183411f 100644
--- a/tests.js
+++ b/tests.js
@@ -679,6 +679,39 @@ page.open(url, function(status) {
679}, 679},
680 680
681// BIP44 account field changes address list 681// BIP44 account field changes address list
682function() {
683page.open(url, function(status) {
684 // set the phrase
685 var expected = "1Nq2Wmu726XHCuGhctEtGmhxo3wzk5wZ1H";
686 page.evaluate(function() {
687 $(".phrase").val("abandon abandon ability");
688 $(".phrase").trigger("input");
689 });
690 waitForGenerate(function() {
691 // change the bip44 purpose field to 45
692 page.evaluate(function() {
693 $("#bip44 .account").val("1");
694 $("#bip44 .account").trigger("input");
695 });
696 waitForGenerate(function() {
697 // check the address for the new derivation path
698 var actual = page.evaluate(function() {
699 return $(".address:first").text();
700 });
701 if (actual != expected) {
702 console.log("BIP44 account field generates incorrect address");
703 console.log("Expected: " + expected);
704 console.log("Actual: " + actual);
705 fail();
706 }
707 next();
708 });
709 });
710});
711},
712
713// TODO finish these tests
714
682// BIP44 external/internal field changes address list 715// BIP44 external/internal field changes address list
683 716
684// BIP32 derivation path can be set 717// BIP32 derivation path can be set