shelljs/ava-test/tempdir.js
2016-11-25 11:03:05 -08:00

22 lines
297 B
JavaScript

import fs from 'fs';
import test from 'ava';
import shell from '..';
shell.config.silent = true;
//
// Valids
//
test('basic usage', t => {
const tmp = shell.tempdir();
t.falsy(shell.error());
t.truthy(fs.existsSync(tmp));
// It's a directory
t.truthy(shell.test('-d', tmp));
});