@@ -265,9 +265,7 @@ describe('finance', () => {
265
265
amount = faker . finance . amount ( 100 , 100 , 1 ) ;
266
266
267
267
expect ( amount ) . toBeTruthy ( ) ;
268
- expect ( amount , 'the amount should be equal 100.0' ) . toStrictEqual (
269
- '100.0'
270
- ) ;
268
+ expect ( amount , 'the amount should be equal 100.0' ) . toBe ( '100.0' ) ;
271
269
} ) ;
272
270
273
271
//TODO: add support for more currency and decimal options
@@ -280,7 +278,7 @@ describe('finance', () => {
280
278
) . toMatch ( / ^ [ 0 - 9 \. ] + $ / ) ;
281
279
} ) ;
282
280
283
- it ( 'it should handle negative amounts' , ( ) => {
281
+ it ( 'should handle negative amounts' , ( ) => {
284
282
const amount = faker . finance . amount ( - 200 , - 1 ) ;
285
283
286
284
expect ( amount ) . toBeTruthy ( ) ;
@@ -292,23 +290,21 @@ describe('finance', () => {
292
290
) . toBeGreaterThan ( - 201 ) ;
293
291
} ) ;
294
292
295
- it ( 'it should handle argument dec' , ( ) => {
293
+ it ( 'should handle argument dec' , ( ) => {
296
294
const amount = faker . finance . amount ( 100 , 100 , 1 ) ;
297
295
298
296
expect ( amount ) . toBeTruthy ( ) ;
299
- expect ( amount , 'the amount should be equal 100.0' ) . toStrictEqual (
300
- '100.0'
301
- ) ;
297
+ expect ( amount , 'the amount should be equal 100.0' ) . toBe ( '100.0' ) ;
302
298
} ) ;
303
299
304
- it ( 'it should handle argument dec = 0' , ( ) => {
300
+ it ( 'should handle argument dec = 0' , ( ) => {
305
301
const amount = faker . finance . amount ( 100 , 100 , 0 ) ;
306
302
307
303
expect ( amount ) . toBeTruthy ( ) ;
308
- expect ( amount , 'the amount should be equal 100' ) . toStrictEqual ( '100' ) ;
304
+ expect ( amount , 'the amount should be equal 100' ) . toBe ( '100' ) ;
309
305
} ) ;
310
306
311
- it ( 'it should return a string' , ( ) => {
307
+ it ( 'should return a string' , ( ) => {
312
308
const amount = faker . finance . amount ( 100 , 100 , 0 ) ;
313
309
314
310
expect ( amount ) . toBeTruthy ( ) ;
@@ -542,9 +538,7 @@ describe('finance', () => {
542
538
} ) ;
543
539
544
540
it ( 'should throw an error when length is less than 1' , ( ) => {
545
- expect ( ( ) => faker . finance . pin ( - 5 ) ) . toThrowError (
546
- / ^ m i n i m u m l e n g t h i s 1 $ /
547
- ) ;
541
+ expect ( ( ) => faker . finance . pin ( - 5 ) ) . toThrow ( / ^ m i n i m u m l e n g t h i s 1 $ / ) ;
548
542
} ) ;
549
543
} ) ;
550
544
@@ -565,7 +559,7 @@ describe('finance', () => {
565
559
expect (
566
560
ibanLib . mod97 ( ibanLib . toDigitString ( bban ) ) ,
567
561
'the result should be equal to 1'
568
- ) . toStrictEqual ( 1 ) ;
562
+ ) . toBe ( 1 ) ;
569
563
} ) ;
570
564
571
565
it ( 'should return a specific and formally correct IBAN number' , ( ) => {
@@ -577,15 +571,15 @@ describe('finance', () => {
577
571
expect (
578
572
ibanLib . mod97 ( ibanLib . toDigitString ( bban ) ) ,
579
573
'the result should be equal to 1'
580
- ) . toStrictEqual ( 1 ) ;
574
+ ) . toBe ( 1 ) ;
581
575
} ) ;
582
576
583
577
it . each ( [ 'AA' , 'EU' ] ) (
584
578
'throws an error for unsupported country code "%s"' ,
585
579
( unsupportedCountryCode ) =>
586
580
expect ( ( ) =>
587
581
faker . finance . iban ( false , unsupportedCountryCode )
588
- ) . toThrowError (
582
+ ) . toThrow (
589
583
new FakerError (
590
584
`Country code ${ unsupportedCountryCode } not supported.`
591
585
)
0 commit comments