import * as fs from 'fs' ; import * as path from 'path' ; describe ( '[TEST]: Angular-RU eslint recommendations for i18n' , ( ) : void => { function getInfoByReportFile ( type ) { return fs . readFileSync ( path . resolve ( __dirname , `../reports/eslint.${ type }-i18n.report.txt` ) ) . toString ( ) ; } it ( 'check failed files' , ( ) : void => { const bad = getInfoByReportFile ( 'bad' ) ; expect ( bad . includes ( '2 problems (2 errors, 0 warnings)' ) ) . toBeTruthy ( ) ; } ) ; it ( 'check success files' , ( ) : void => { const good = getInfoByReportFile ( 'good' ) ; expect ( good ) . toHaveLength ( 0 ) ; } ) ; } ) ;