Skip to content

Commit d21b40d

Browse files
author
Vadim Demedes
committed
Merge pull request #548 from sotojuan/fix-test-worker
Fix test worker crash when executed without AVA CLI
2 parents e9cb25d + 34efa78 commit d21b40d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

index.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ var beautifyStack = require('./lib/beautify-stack');
66
var globals = require('./lib/globals');
77
var Runner = require('./lib/runner');
88
var send = require('./lib/send');
9-
var log = require('./lib/logger');
109

1110
// note that test files have require('ava')
1211
require('./lib/test-worker').avaRequired = true;
@@ -23,8 +22,8 @@ var isForked = typeof process.send === 'function';
2322
if (!isForked) {
2423
var fp = path.relative('.', process.argv[1]);
2524

26-
log.write();
27-
log.error('Test files must be run with the AVA CLI:\n\n ' + chalk.grey.dim('$') + ' ' + chalk.cyan('ava ' + fp) + '\n');
25+
console.log();
26+
console.error('Test files must be run with the AVA CLI:\n\n ' + chalk.grey.dim('$') + ' ' + chalk.cyan('ava ' + fp) + '\n');
2827

2928
process.exit(1);
3029
}

0 commit comments

Comments
 (0)