1 |
|
2 |
|
3 | const shell = require('shelljs')
|
4 | const path = require('path')
|
5 | const { getConfig } = require('../lib/config')
|
6 |
|
7 | const config = getConfig()
|
8 | const nodeExec = `npx babel-node --extensions '.ts,.tsx,.js,.jsx'`
|
9 | const pathToFile = path.resolve(config.projectRoot, config.pathToTestIndex, config.testIndexName)
|
10 | const command = `${nodeExec} ${pathToFile}`
|
11 | shell.echo(`Command: ${command}`)
|
12 | shell.cd(config.projectRoot)
|
13 | shell.exec(command)
|
14 | shell.exit()
|