aboutsummaryrefslogtreecommitdiff
path: root/tests.js
diff options
context:
space:
mode:
authorIan Coleman <coleman.ian@gmail.com>2016-10-05 12:11:31 +1100
committerIan Coleman <coleman.ian@gmail.com>2016-10-05 12:11:31 +1100
commita7becc4305fd0f0a35370a79870803afe7b34639 (patch)
tree58cb71fb9ab64d30450f3b4a9a4481c16b097270 /tests.js
parentc97627faa4496083767edd58c4e3de4d569ad89f (diff)
downloadBIP39-a7becc4305fd0f0a35370a79870803afe7b34639.tar.gz
BIP39-a7becc4305fd0f0a35370a79870803afe7b34639.tar.zst
BIP39-a7becc4305fd0f0a35370a79870803afe7b34639.zip
Test mnemonic is not sensitive to whitespace
Diffstat (limited to 'tests.js')
-rw-r--r--tests.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests.js b/tests.js
index 35c735e..c09a8fd 100644
--- a/tests.js
+++ b/tests.js
@@ -1627,6 +1627,30 @@ page.open(url, function(status) {
1627 1627
1628// Github Issue 19: Mnemonic is not sensitive to whitespace 1628// Github Issue 19: Mnemonic is not sensitive to whitespace
1629// https://github.com/dcpos/bip39/issues/19 1629// https://github.com/dcpos/bip39/issues/19
1630function() {
1631page.open(url, function(status) {
1632 // set the phrase
1633 var expected = "xprv9s21ZrQH143K3isaZsWbKVoTtbvd34Y1ZGRugGdMeBGbM3AgBVzTH159mj1cbbtYSJtQr65w6L5xy5L9SFC7c9VJZWHxgAzpj4mun5LhrbC";
1634 page.evaluate(function() {
1635 var doubleSpace = " ";
1636 $(".phrase").val("urge cat" + doubleSpace + "bid");
1637 $(".phrase").trigger("input");
1638 });
1639 waitForGenerate(function() {
1640 // Check the bip32 root key is correct
1641 var actual = page.evaluate(function() {
1642 return $(".root-key").val();
1643 });
1644 if (actual != expected) {
1645 console.log("Mnemonic is sensitive to whitespace");
1646 console.log("Expected: " + expected);
1647 console.log("Actual: " + actual);
1648 fail();
1649 }
1650 next();
1651 });
1652});
1653},
1630 1654
1631// Github Issue 23: Use correct derivation path when changing tabs 1655// Github Issue 23: Use correct derivation path when changing tabs
1632// https://github.com/dcpos/bip39/issues/23 1656// https://github.com/dcpos/bip39/issues/23