Skip to content
Myr

wait.js

This file

Path

test/helpers/wait.js

17 lines · 503 bytes · JavaScript

Last changed by

Require Node.js 22 (#1243)Sindre Sorhusbefore adoption04b4454

History of this file

Take it

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

Require Node.js 22 (#1243)Sindre Sorhusbefore adoption04b4454

lines 1–2why, one step back
1import {getStdio} from './stdio.js';
2import {noopGenerator} from './generator.js';

100% test coverage (#1018)ehmickybefore adoption9f65b86

lines 3–17why, one step back
3
4export const endOptionStream = ({stream}) => {5 stream.end();6};78export const destroyOptionStream = ({stream, error}) => {9 stream.destroy(error);10};1112export const destroySubprocessStream = ({subprocess, fdNumber, error}) => {13 subprocess.stdio[fdNumber].destroy(error);14};1516export const getStreamStdio = (fdNumber, stream, useTransform) =>17 getStdio(fdNumber, [stream, useTransform ? noopGenerator(false) : 'pipe']);