import * as ts from 'typescript' ; export class MockModule implements ts . ModuleResolutionHost { constructor ( private mockFileName , private mockContent ) { } fileExists ( fileName ) { return this . mockFileName === fileName ; } readFile ( fileName ) { return this . mockFileName === fileName ? this . mockContent : null ; } }