File: override-promise.js

package info (click to toggle)
node-execa 8.0.1%2Bdfsg1%2B~cs12.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 1,588 kB
  • sloc: javascript: 2,940; makefile: 11; sh: 1
file content (14 lines) | stat: -rw-r--r-- 478 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import test from 'ava';
// The helper module overrides Promise on import so has to be imported before `execa`.
import {restorePromise} from './helpers/override-promise.js';
// eslint-disable-next-line import/order
import {execa} from '../index.js';
import {setFixtureDir} from './helpers/fixtures-dir.js';

restorePromise();
setFixtureDir();

test('should work with third-party Promise', async t => {
	const {stdout} = await execa('noop.js', ['foo']);
	t.is(stdout, 'foo');
});