@@ -120,12 +120,14 @@ describe('.generate()', function () {
120
120
121
121
describe ( '.generateVanityAddress()' , function ( ) {
122
122
it ( 'should generate an account with 000 prefix (object)' , function ( ) {
123
+ this . timeout ( 180000 ) // 3minutes
123
124
var wallet = Wallet . generateVanityAddress ( / ^ 0 0 0 / )
124
125
assert . equal ( wallet . getPrivateKey ( ) . length , 32 )
125
126
assert . equal ( wallet . getAddress ( ) [ 0 ] , 0 )
126
127
assert . equal ( wallet . getAddress ( ) [ 1 ] >>> 4 , 0 )
127
128
} )
128
129
it ( 'should generate an account with 000 prefix (string)' , function ( ) {
130
+ this . timeout ( 180000 ) // 3minutes
129
131
var wallet = Wallet . generateVanityAddress ( '^000' )
130
132
assert . equal ( wallet . getPrivateKey ( ) . length , 32 )
131
133
assert . equal ( wallet . getAddress ( ) [ 0 ] , 0 )
@@ -155,10 +157,12 @@ describe('.toV3()', function () {
155
157
// FIXME: just test for ciphertext and mac?
156
158
assert . equal ( fixtureWallet . toV3String ( 'testtest' , { kdf : 'scrypt' , uuid : uuid , salt : salt , iv : iv } ) , w )
157
159
} )
158
- it ( 'should work without providing options' , function ( ) {
160
+ it ( 'should work without providing options' , function ( ) {
161
+ this . timeout ( 180000 ) // 3minutes
159
162
assert . equal ( fixtureWallet . toV3 ( 'testtest' ) [ 'version' ] , 3 )
160
163
} )
161
164
it ( 'should fail for unsupported kdf' , function ( ) {
165
+ this . timeout ( 180000 ) // 3minutes
162
166
assert . throws ( function ( ) {
163
167
fixtureWallet . toV3 ( 'testtest' , { kdf : 'superkey' } )
164
168
} , / ^ E r r o r : U n s u p p o r t e d k d f $ / )
@@ -204,6 +208,18 @@ describe('.fromV3()', function () {
204
208
Wallet . fromV3 ( w , 'testpassword' )
205
209
} ) // FIXME: check for assert message(s)
206
210
} )
211
+ it ( 'should fail for wrong version' , function ( ) {
212
+ var w = '{"version":2}'
213
+ assert . throws ( function ( ) {
214
+ Wallet . fromV3 ( w , 'testpassword' )
215
+ } , / ^ E r r o r : N o t a V 3 w a l l e t $ / )
216
+ } )
217
+ it ( 'should fail for wrong kdf' , function ( ) {
218
+ var w = '{"Crypto":{"kdf":"superkey"},"version":3}'
219
+ assert . throws ( function ( ) {
220
+ Wallet . fromV3 ( w , 'testpassword' , true )
221
+ } , / ^ E r r o r : U n s u p p o r t e d k e y d e r i v a t i o n s c h e m e $ / )
222
+ } )
207
223
} )
208
224
209
225
describe ( '.fromEthSale()' , function ( ) {
0 commit comments