Skip to content
Myr

test.js

This file

Path

test.js

23 lines · 547 bytes · JavaScript

Last changed by

initSindre Sorhusbefore adoptionbc16d6b

History of this file

Take it

initSindre Sorhusbefore adoptionbc16d6b

lines 1–23
1import test from 'ava';
2import fn from './';34test('execa()', async t => {5 const {stdout} = await fn('echo', ['foo']);6 t.is(stdout, 'foo');7});89test('buffer', async t => {10 const {stdout} = await fn('echo', ['foo'], {encoding: null});11 t.true(Buffer.isBuffer(stdout));12 t.is(stdout.toString(), 'foo');13});1415test('stripEof option', async t => {16 const {stdout} = await fn('echo', ['foo'], {stripEof: false});17 t.is(stdout, 'foo\n');18});1920test('execa.shell()', async t => {21 const {stdout} = await fn.shell('echo foo');22 t.is(stdout, 'foo');23});