Skip to content

test: refactor exec tests to AVA#574

Merged
freitagbr merged 2 commits intomasterfrom
test-ava-exec
Dec 1, 2016
Merged

test: refactor exec tests to AVA#574
freitagbr merged 2 commits intomasterfrom
test-ava-exec

Conversation

@nfischer
Copy link
Copy Markdown
Member

This is an automated PR, so double check that I got all the test cases. I'll follow up once I've verified that this translates everything correctly.

ava-test/exec.js Outdated
shell.exec(`${JSON.stringify(process.execPath)} -e 'console.log(5678);'`, { silent: true }, (code3, stdout3, stderr3) => {
t.is(code3, 0);
t.is(stdout3, '5678\n');
t.is(stderr3, '');
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This and the test above can use code, stdout, and stderr and callback arguments.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Done

ava-test/exec.js Outdated
//

test('check if stdout goes to output', t => {
const result = shell.exec(`${JSON.stringify(process.execPath)} -e 'console.log(1234);'`);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do the single-quotes work on Windows?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

They might not. I'll change them back and see

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It looks like AppVeyor passed now, so I think this solved the issue.

@freitagbr
Copy link
Copy Markdown
Contributor

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants