]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/BIP39.git/commitdiff
Test BIP44 derivation path is shown
authorIan Coleman <coleman.ian@gmail.com>
Tue, 23 Aug 2016 08:22:12 +0000 (18:22 +1000)
committerIan Coleman <coleman.ian@gmail.com>
Tue, 23 Aug 2016 08:22:28 +0000 (18:22 +1000)
tests.js

index 7f133cd7e3d5ed4e9e700f0b6a4c0daaa54247ac..a04137f84d4205eea1917a9168964e8e8b5f2227 100644 (file)
--- a/tests.js
+++ b/tests.js
@@ -525,6 +525,30 @@ page.open(url, function(status) {
 },
 
 // BIP44 derivation path is shown
+function() {
+page.open(url, function(status) {
+    // set the phrase
+    var expected = "m/44'/0'/0'/0";
+    page.evaluate(function() {
+        $(".phrase").val("abandon abandon ability");
+        $(".phrase").trigger("input");
+    });
+    // check the derivation path of the first address
+    waitForGenerate(function() {
+        var actual = page.evaluate(function() {
+            return $("#bip44 .path").val();
+        });
+        if (actual != expected) {
+            console.log("BIP44 derivation path is incorrect");
+            console.log("Expected: " + expected);
+            console.log("Actual: " + actual);
+            fail();
+        }
+        next();
+    });
+});
+},
+
 // TODO finish these tests
 
 // BIP44 extended private key is shown