exframe-testing
Advanced tools
Comparing version 3.3.5 to 3.3.6
14
cli.js
@@ -72,2 +72,4 @@ #!/usr/bin/env node | ||
log.info('Running tests with options', { unit, contract }); | ||
const checkHealth = () => { | ||
@@ -143,3 +145,3 @@ let timedOut = false; | ||
} catch (e) { | ||
log.error({ errorData: e }); | ||
log.error('Error starting contract tests', { errorData: e }); | ||
process.exitCode = 1; | ||
@@ -204,2 +206,5 @@ } finally { | ||
container.stderr.pipe(process.stderr); | ||
container.on('error', (error) => { | ||
log.error('Error running tests in container', { errorData: error, containerName }); | ||
}); | ||
container.on('close', code => { | ||
@@ -224,10 +229,15 @@ process.exitCode = code; | ||
if (unit) { | ||
log.info('Running unit tests'); | ||
const unitResults = childProcess.spawnSync('npm', ['run', 'unit-tests', '--silent'], { stdio: 'inherit' }); | ||
log.info('Unit test results', { unitResults }); | ||
failures += unitResults.status; | ||
} | ||
if (contract) { | ||
log.info('Running contract tests'); | ||
try { | ||
const code = await runContractTests(); | ||
log.info('Contract test results', { code }); | ||
failures += code; | ||
childProcess.spawnSync('npm', ['run', 'combine-coverage'], { stdio: 'inherit' }); | ||
const coverResult = childProcess.spawnSync('npm', ['run', 'combine-coverage'], { stdio: 'inherit' }); | ||
log.info('Combine coverage results', { coverResult }); | ||
process.exit(failures); // eslint-disable-line no-process-exit | ||
@@ -234,0 +244,0 @@ } catch (error) { |
{ | ||
"name": "exframe-testing", | ||
"version": "3.3.5", | ||
"version": "3.3.6", | ||
"bin": { | ||
@@ -43,3 +43,3 @@ "exframe-testing": "cli.js" | ||
}, | ||
"gitHead": "8210f617fbb22b005cd8872cc7694367a0acc0d1" | ||
"gitHead": "358f85a1eb1077c399acc73c9ef3e8cd957df2cb" | ||
} |
33050
524