diff --git a/test/override-promise.js b/test/override-promise.js index 4025c995b9..e89e845c2c 100644 --- a/test/override-promise.js +++ b/test/override-promise.js @@ -1,5 +1,9 @@ +import path from 'path'; import test from 'ava'; +process.env.PATH = path.join(__dirname, 'fixtures') + path.delimiter + process.env.PATH; +process.env.FOO = 'foo'; + // Can't use `test.before`, maybe because `ava` need `Promise` // Can't use `import('..')` too, unknown reason const nativePromise = Promise; @@ -12,6 +16,6 @@ const execa = require('..'); global.Promise = nativePromise; test('Should work with third party Promise', async t => { - const {stdout} = await execa('echo execa'); - t.is(stdout, 'execa'); + const {stdout} = await execa('noop', ['foo']); + t.is(stdout, 'foo'); });