import { spawner , SpawnResult } from '@integration/testing-tools' ; import * as path from 'path' ; const mochaExecutable = path . resolve ( require . resolve ( 'mocha/package.json' ) , '..' , 'bin' , '_mocha' ) ; const mochaSpawner = spawner ( mochaExecutable , { cwd : path . resolve ( __dirname , '..' ) } ) ; see https param { string [ ] } params export function mocha ( ... params ) { return mochaSpawner ( ... params , `--reporter=${ path . resolve ( __dirname , '../../../packages/mocha' ) }` , `--require=${ path . resolve ( __dirname , '../../../integration/mocha/examples/setup.js' ) }` ) ; }