Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add test case for throwing on non-executables #49

Merged

Conversation

KnisterPeter
Copy link
Contributor

add a test case for #47
In master this does not fail anymore, but a test case if it may help to avoid regression

@sindresorhus
Copy link
Owner

Would you be able to fix the merge conflict?

@KnisterPeter
Copy link
Contributor Author

Sure :)

@KnisterPeter
Copy link
Contributor Author

I think it may be hard to test on windows boxes :(

@KnisterPeter
Copy link
Contributor Author

I will give it some thoughts tomorrow.

windows platform do not know about executable flags in a unix/linux sense.
Therefore this test will fail on windows and we skip it.
@@ -166,6 +167,13 @@ test(`use relative path with '..' chars`, async t => {
t.is(stdout, 'foo');
});

test('execa() throws if running non executable', async t => {
// windows systems do not know executable-flags
if (os.platform() !== 'win32') {
Copy link
Owner

Choose a reason for hiding this comment

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

Better to wrap the whole test in that if statement. Also no need to import os. Just use process.platform.

@sindresorhus sindresorhus merged commit e10d263 into sindresorhus:master Aug 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants