Skip to content
Myr

override-promise.js

This file

Path

test/methods/override-promise.js

14 lines · 516 bytes · JavaScript

Last changed by

TweaksSindre Sorhusbefore adoption698a1b8

History of this file

Take it

The walk stopped after 200 commits: lines older than 9f65b86 point at it.

TweaksSindre Sorhusbefore adoption698a1b8

lines 1–2why, one step back
1import assert from 'node:assert/strict';
2import test from 'node:test';

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 3–10why, one step back
3// The helper module overrides Promise on import so has to be imported before `execa`.
4import {restorePromise} from '../helpers/override-promise.js';5import {execa} from '../../index.js';6import {setFixtureDirectory} from '../helpers/fixtures-directory.js';78restorePromise();9setFixtureDirectory();10

TweaksSindre Sorhusbefore adoption698a1b8

line 11why, one step back
11test('should work with third-party Promise', async () => {

100% test coverage (#1018)ehmickybefore adoption9f65b86

line 12why, one step back
12 const {stdout} = await execa('noop.js', ['foo']);

TweaksSindre Sorhusbefore adoption698a1b8

line 13why, one step back
13 assert.equal(stdout, 'foo');

100% test coverage (#1018)ehmickybefore adoption9f65b86

line 14why, one step back
14});