From 7fe9e0cf2188796c22b8a5d962886c48f954e958 Mon Sep 17 00:00:00 2001 From: fisker Date: Fri, 22 May 2020 11:06:14 +0800 Subject: [PATCH] Update test --- test/override-promise.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/override-promise.js b/test/override-promise.js index 4025c995b9..528d5acac7 100644 --- a/test/override-promise.js +++ b/test/override-promise.js @@ -1,5 +1,8 @@ +import path from 'path'; import test from 'ava'; +process.env.PATH = path.join(__dirname, 'fixtures') + path.delimiter + process.env.PATH; + // Can't use `test.before`, maybe because `ava` need `Promise` // Can't use `import('..')` too, unknown reason const nativePromise = Promise; @@ -12,6 +15,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'); });