aboutsummaryrefslogtreecommitdiff
path: root/tests.js
diff options
context:
space:
mode:
authorIan Coleman <coleman.ian@gmail.com>2016-10-03 11:22:49 +1100
committerIan Coleman <coleman.ian@gmail.com>2016-10-03 11:22:49 +1100
commit55c0ffcbdf6f8d3eb077c170d8742f9ebea85b5e (patch)
tree62d8b85ac40c3fc94c2d755e5cc2f1c13a2eb68d /tests.js
parentf976b5410fad041cc7da70a0e667c0b4d4fcb7f1 (diff)
downloadBIP39-55c0ffcbdf6f8d3eb077c170d8742f9ebea85b5e.tar.gz
BIP39-55c0ffcbdf6f8d3eb077c170d8742f9ebea85b5e.tar.zst
BIP39-55c0ffcbdf6f8d3eb077c170d8742f9ebea85b5e.zip
Test derivation path containing invalid characters
Diffstat (limited to 'tests.js')
-rw-r--r--tests.js31
1 files changed, 31 insertions, 0 deletions
diff --git a/tests.js b/tests.js
index 49a95b7..2384b42 100644
--- a/tests.js
+++ b/tests.js
@@ -1533,6 +1533,37 @@ page.open(url, function(status) {
1533}, 1533},
1534 1534
1535// Derivation path containing invalid characters shows useful error 1535// Derivation path containing invalid characters shows useful error
1536function() {
1537page.open(url, function(status) {
1538 // set the mnemonic phrase
1539 page.evaluate(function() {
1540 $(".phrase").val("abandon abandon ability").trigger("input");
1541 });
1542 waitForGenerate(function() {
1543 // select the bip32 tab so custom derivation path can be set
1544 page.evaluate(function() {
1545 $("#bip32-tab a").click();
1546 });
1547 waitForGenerate(function() {
1548 // set the incorrect derivation path
1549 page.evaluate(function() {
1550 $("#bip32 .path").val("m/1/0wrong1/1").trigger("input");
1551 });
1552 waitForFeedback(function() {
1553 var feedback = page.evaluate(function() {
1554 return $(".feedback").text();
1555 });
1556 if (feedback != "Invalid characters 0wrong1 found at depth 2") {
1557 console.log("Derivation path with invalid characters should show error");
1558 console.log("Error: " + error);
1559 fail();
1560 }
1561 next();
1562 });
1563 });
1564 });
1565});
1566},
1536 1567
1537// Github Issue 11: Default word length is 15 1568// Github Issue 11: Default word length is 15
1538// https://github.com/dcpos/bip39/issues/11 1569// https://github.com/dcpos/bip39/issues/11