import * as fs from 'fs' ; import * as rimraf from 'rimraf' ; /**
 * Contains methods that are commonly used across test areas.
 */ export class Util { constructor ( ) { } public removeFile ( filePath ) { try { fs . unlinkSync ( `${ filePath }` ) ; } catch ( e ) { if ( e . code !== 'ENOENT' ) { throw e ; } } } public rimraf ( directory ) { return new Promise ( ( res , rej ) => { rimraf ( directory , err => { if ( err ) { rej ( err ) ; } res ( ) ; } ) ; } ) ; } } export function sanitize ( name ) { return name . replace ( /[&*:\/]/g , '' ) ; }