aboutsummaryrefslogtreecommitdiff
path: root/tests.js
diff options
context:
space:
mode:
authorIan Coleman <coleman.ian@gmail.com>2017-10-10 12:04:27 +1100
committerIan Coleman <coleman.ian@gmail.com>2017-10-10 12:04:27 +1100
commit0cca6e893af22e7b6d4e3621a8a0bf3c68c00e41 (patch)
tree299c156d9f6d9b43ec97546d744ac79417c6008a /tests.js
parentf2a1a8e67fb2ba69861d4f60ac3dc2fcf8f4ed3f (diff)
downloadBIP39-0cca6e893af22e7b6d4e3621a8a0bf3c68c00e41.tar.gz
BIP39-0cca6e893af22e7b6d4e3621a8a0bf3c68c00e41.tar.zst
BIP39-0cca6e893af22e7b6d4e3621a8a0bf3c68c00e41.zip
Add test for nubits network
Diffstat (limited to 'tests.js')
-rw-r--r--tests.js30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests.js b/tests.js
index 850e58f..8ac5646 100644
--- a/tests.js
+++ b/tests.js
@@ -1052,6 +1052,36 @@ page.open(url, function(status) {
1052}); 1052});
1053}, 1053},
1054 1054
1055// Network can be set to nubits
1056function() {
1057page.open(url, function(status) {
1058 // set the phrase and coin
1059 var expected = "BLxkabXuZSJSdesLD7KxZdqovd4YwyBTU6";
1060 page.evaluate(function() {
1061 $(".phrase").val("abandon abandon ability");
1062 $(".phrase").trigger("input");
1063 $(".network option[selected]").removeAttr("selected");
1064 $(".network option").filter(function() {
1065 return $(this).html() == "USNBT - NuBits";
1066 }).prop("selected", true);
1067 $(".network").trigger("change");
1068 });
1069 // check the address is generated correctly
1070 waitForGenerate(function() {
1071 var actual = page.evaluate(function() {
1072 return $(".address:first").text();
1073 });
1074 if (actual != expected) {
1075 console.log("NuBits address is incorrect");
1076 console.log("Expected: " + expected);
1077 console.log("Actual: " + actual);
1078 fail();
1079 }
1080 next();
1081 });
1082});
1083},
1084
1055// BIP39 seed is set from phrase 1085// BIP39 seed is set from phrase
1056function() { 1086function() {
1057page.open(url, function(status) { 1087page.open(url, function(status) {