const generateRandomStringOrGetEmptyInTest = ( base = '' ) => { if ( process . env . NODE_ENV === 'test' ) { return base ; } return base + generateRandomString ( ) ; } ; const generateRandomString = ( ) => Math . random ( ) . toString ( 36 ) . substring ( 7 ) ; export { generateRandomString , generateRandomStringOrGetEmptyInTest } ;