1
0
Fork 0
This commit is contained in:
Enoch Riese 2022-11-16 11:55:55 -06:00
parent afcecc50ac
commit 7742d5cd21
2 changed files with 5 additions and 20 deletions

View file

@ -2,9 +2,7 @@ const fs = require('fs')
const path = require('path')
const spawn = require('child_process').spawn
const projectRoot = path.normalize(path.join(__dirname, '..'))
const outputLog = path.join(projectRoot, '.test-failures.log')
const collectorScript = path.join(projectRoot, 'tests', 'reporters', 'terser.js')
// Start with a fresh output log on each run.
if (fs.existsSync(outputLog)) {
@ -12,23 +10,9 @@ if (fs.existsSync(outputLog)) {
}
// Run all tests, specifying the collector script.
spawn(
'lerna',
[
'run',
'--no-bail',
'testci',
'--loglevel',
'error',
'--',
// '--reporter',
// 'min'
// '--reporter',
// `${collectorScript}`,
'--no-warnings',
],
{ stdio: 'inherit' }
).on('exit', function (code) {
spawn('lerna', ['run', '--no-bail', 'testci', '--loglevel', 'error', '--', '--no-warnings'], {
stdio: 'inherit',
}).on('exit', function (code) {
// If a failure occurred, the log file will have been created. Print it.
if (fs.existsSync(outputLog)) {
console.error(fs.readFileSync(outputLog, 'utf8').trim())