Skip to content
Myr

add test case for throwing on non-executables (#49)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Markus Wolf · committed by Sindre Sorhus · parent b15483a · Browse files · 2 files+9 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+9 added−0 removed

  • other:+9 added−0 removed

2 files+9 added−0 removed

added:fixtures/non-executable+3 added
1#!/usr/bin/env node2'use strict';3console.log(process.argv[2]);
modified:test.js+6 added
164 unmodified lines
165 const {stdout} = await m(pathViaParentDir, ['foo']);166 t.is(stdout, 'foo');167});168169if (process.platform !== 'win32') {170 test('execa() throws if running non executable', async t => {171 t.throws(() => m('non-executable'));172 });173}174175test('err.killed is true if process was killed directly', async t => {176 const cp = m('forever');177178 setTimeout(function () {
106 unmodified lines