Skip to content
Myr

input-sync.js

This file

Path

test/io/input-sync.js

18 lines · 714 bytes · JavaScript

Last changed by

Upgrade xo (#980)ehmickybefore adoptionccfa412

History of this file

Take it

Rename files (#977)ehmickybefore adoption4b2e316

lines 1–2why, one step back
1import test from 'ava';
2import {execaSync} from '../../index.js';

Upgrade xo (#980)ehmickybefore adoptionccfa412

line 3why, one step back
3import {setFixtureDirectory} from '../helpers/fixtures-directory.js';

Rename files (#977)ehmickybefore adoption4b2e316

lines 4–5why, one step back
4import {getStdio} from '../helpers/stdio.js';
5

Upgrade xo (#980)ehmickybefore adoptionccfa412

line 6why, one step back
6setFixtureDirectory();

Rename files (#977)ehmickybefore adoption4b2e316

lines 7–18why, one step back
7
8const getFd3InputMessage = type => `not \`stdio[3]\`, can be ${type}`;910const testFd3InputSync = (t, stdioOption, expectedMessage) => {11 const {message} = t.throws(() => {12 execaSync('empty.js', getStdio(3, stdioOption));13 });14 t.true(message.includes(expectedMessage));15};1617test('Cannot use Uint8Array with stdio[*], sync', testFd3InputSync, new Uint8Array(), getFd3InputMessage('a Uint8Array'));18test('Cannot use iterable with stdio[*], sync', testFd3InputSync, [[]], getFd3InputMessage('an iterable'));