1import { join } from 'path'; 2 3import { Config } from './Config'; 4 5export default class ConfigReader { 6 constructor(private path: string) {} 7 8 readConfigFile(): Config { 9 return require(this.path) as Config; 10 } 11 12 static getFilePath(path: string | undefined): string { 13 return path ? path : join(process.cwd(), 'test-runner.config.js'); 14 } 15} 16