shelljs/test/tempdir.js
Nate Fischer 2395214fee chore: switch to eslint (#504)
* chore: switch to eslint

* fix: works on older versions of NodeJS now

* chore: fix curly braces

* chore: fix indents and remove jshint references
2016-08-07 12:16:29 -07:00

20 lines
296 B
JavaScript

var shell = require('..');
var assert = require('assert');
var fs = require('fs');
shell.config.silent = true;
shell.rm('-rf', 'tmp');
shell.mkdir('tmp');
//
// Valids
//
var tmp = shell.tempdir();
assert.equal(shell.error(), null);
assert.equal(fs.existsSync(tmp), true);
shell.exit(123);