File tree 2 files changed +16
-1
lines changed
2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -326,7 +326,7 @@ export class Random {
326
326
const randomWordMethod = this . faker . random . arrayElement ( wordMethods ) ;
327
327
328
328
result = randomWordMethod ( ) ;
329
- } while ( bannedChars . some ( ( char ) => result . includes ( char ) ) ) ;
329
+ } while ( ! result || bannedChars . some ( ( char ) => result . includes ( char ) ) ) ;
330
330
331
331
return this . faker . random . arrayElement ( result . split ( ' ' ) ) ;
332
332
}
Original file line number Diff line number Diff line change @@ -268,4 +268,19 @@ describe('system', () => {
268
268
} ) ;
269
269
}
270
270
} ) ;
271
+
272
+ describe ( 'extra tests' , ( ) => {
273
+ describe ( 'commonFileName()' , ( ) => {
274
+ afterEach ( ( ) => {
275
+ faker . locale = 'en' ;
276
+ } ) ;
277
+
278
+ it ( '#770' , ( ) => {
279
+ faker . seed ( 5423027051750305 ) ;
280
+ faker . setLocale ( 'sk' ) ;
281
+ faker . system . commonFileName ( 'xml' ) ;
282
+ faker . system . commonFileName ( 'xml' ) ;
283
+ } ) ;
284
+ } ) ;
285
+ } ) ;
271
286
} ) ;
You can’t perform that action at this time.
0 commit comments