Skip to content
This repository was archived by the owner on Aug 8, 2020. It is now read-only.
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ const through = require('through2');
const dargs = require('dargs');
const resolveCwd = require('resolve-cwd');
const execa = require('execa');
const fs = require('fs');

const BINARY = require.resolve('ava/cli.js');

Expand Down Expand Up @@ -50,6 +51,11 @@ module.exports = options => {
subprocess.stderr.pipe(process.stderr);
}

if (options.outputfile) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (options.outputfile) {
if (options.outputFile) {

And the option needs to be documented in the readme.

let filestream = fs.createWriteStream(options.outputfile);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let filestream = fs.createWriteStream(options.outputfile);
const fileStream = fs.createWriteStream(options.outputfile);

subprocess.stdout.pipe(filestream);
}

try {
await subprocess;
callback();
Expand Down