shelljs/test/tempdir.js
Brandon Freitag 7fa4b995bf Finalize moving to ava (#630)
* Move ava-test/ directory to test/

* Remove unnecessary run-tests.js script

* Run only ava during npm test script
2016-12-20 11:27:02 -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));
});