File tree 2 files changed +10
-1
lines changed
2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ export class Vehicle {
84
84
bannedChars : bannedChars ,
85
85
} ) +
86
86
this . faker . random . alphaNumeric ( 1 , { bannedChars : bannedChars } ) +
87
- this . faker . datatype . number ( { min : 10000 , max : 100000 } )
87
+ this . faker . datatype . number ( { min : 10000 , max : 99999 } )
88
88
) // return five digit #
89
89
. toUpperCase ( ) ;
90
90
}
Original file line number Diff line number Diff line change @@ -58,6 +58,15 @@ describe('vehicle', () => {
58
58
/ ^ ( [ A - H J - N P R - Z 0 - 9 ] { 10 } [ A - H J - N P R - Z 0 - 9 ] { 1 } [ A - H J - N P R - Z 0 - 9 ] { 1 } \d { 5 } ) $ /
59
59
) ;
60
60
} ) ;
61
+
62
+ it ( 'is 17 characters long' , ( ) => {
63
+ for ( let step = 0 ; step < 300000 ; step ++ ) {
64
+ const vin = faker . vehicle . vin ( ) ;
65
+ expect ( vin ) . match (
66
+ / ^ ( [ A - H J - N P R - Z 0 - 9 ] { 10 } [ A - H J - N P R - Z 0 - 9 ] { 1 } [ A - H J - N P R - Z 0 - 9 ] { 1 } \d { 5 } ) $ /
67
+ ) ;
68
+ }
69
+ } ) ;
61
70
} ) ;
62
71
63
72
describe ( 'color()' , ( ) => {
You can’t perform that action at this time.
0 commit comments