File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -148,6 +148,23 @@ describe('ECPair', function () {
148148 assert . strictEqual ( keyPair . toWIF ( ) , exWIF )
149149 } )
150150
151+ it ( 'retains the same defaults as ECPair constructor' , function ( ) {
152+ var keyPair = ECPair . makeRandom ( )
153+
154+ assert . strictEqual ( keyPair . compressed , true )
155+ assert . strictEqual ( keyPair . network , NETWORKS . bitcoin )
156+ } )
157+
158+ it ( 'supports the options parameter' , function ( ) {
159+ var keyPair = ECPair . makeRandom ( {
160+ compressed : false ,
161+ network : NETWORKS . testnet
162+ } )
163+
164+ assert . strictEqual ( keyPair . compressed , false )
165+ assert . strictEqual ( keyPair . network , NETWORKS . testnet )
166+ } )
167+
151168 it ( 'loops until d is within interval [1, n - 1]' , sinon . test ( function ( ) {
152169 var rng = this . mock ( )
153170 rng . exactly ( 3 )
You can’t perform that action at this time.
0 commit comments