File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -15,14 +15,9 @@ import {
1515 checkExpectedLogMessages ,
1616 getRecordingLogger ,
1717 LoggedMessage ,
18+ makeTestToken ,
1819} from "./testing-utils" ;
1920
20- function makeTestToken ( length : number = 36 ) {
21- const chars =
22- "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" ;
23- return chars . repeat ( Math . ceil ( length / chars . length ) ) . slice ( 0 , length ) ;
24- }
25-
2621test ( "makeTestToken" , ( t ) => {
2722 t . is ( makeTestToken ( ) . length , 36 ) ;
2823 t . is ( makeTestToken ( 255 ) . length , 255 ) ;
Original file line number Diff line number Diff line change @@ -412,3 +412,9 @@ export function createTestConfig(overrides: Partial<Config>): Config {
412412 overrides ,
413413 ) ;
414414}
415+
416+ export function makeTestToken ( length : number = 36 ) {
417+ const chars =
418+ "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" ;
419+ return chars . repeat ( Math . ceil ( length / chars . length ) ) . slice ( 0 , length ) ;
420+ }
You can’t perform that action at this time.
0 commit comments