aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorIan Coleman <ian@iancoleman.io>2018-03-12 10:33:07 +1100
committerIan Coleman <ian@iancoleman.io>2018-03-12 11:31:41 +1100
commitf8ca25c3381d5071426497eb3bf34ff5cdf094ee (patch)
treedff5457f94f6b0337398f78e40837172f27b518e /tests
parent548d94994b97fe8d01f2712fbf82df61e3d98133 (diff)
downloadBIP39-f8ca25c3381d5071426497eb3bf34ff5cdf094ee.tar.gz
BIP39-f8ca25c3381d5071426497eb3bf34ff5cdf094ee.tar.zst
BIP39-f8ca25c3381d5071426497eb3bf34ff5cdf094ee.zip
Add spacing every 11 bits to the checksum
Diffstat (limited to 'tests')
-rw-r--r--tests/spec/tests.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/spec/tests.js b/tests/spec/tests.js
index f56b18d..c7a9889 100644
--- a/tests/spec/tests.js
+++ b/tests/spec/tests.js
@@ -2937,4 +2937,21 @@ it('Shows the checksum for the entropy', function(done) {
2937 }); 2937 });
2938}); 2938});
2939 2939
2940it('Shows the checksum for the entropy with the correct groupings', function(done) {
2941 driver.findElement(By.css('.use-entropy'))
2942 .click();
2943 // create a checksum of 20 bits, which spans multiple words
2944 driver.findElement(By.css('.entropy'))
2945 .sendKeys("F000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000");
2946 driver.sleep(generateDelay).then(function() {
2947 driver.findElement(By.css('.checksum'))
2948 .getText()
2949 .then(function(text) {
2950 // first group is 9 bits, second group is 11
2951 expect(text).toBe("011010111 01110000110");
2952 done();
2953 });
2954 });
2955});
2956
2940}); 2957});