mirror of
https://github.com/jprichardson/node-fs-extra.git
synced 2026-01-25 16:42:57 +00:00
25 lines
556 B
JavaScript
25 lines
556 B
JavaScript
var assert = require('assert')
|
|
var fs = require('fs')
|
|
var path = require('path')
|
|
var fse = require('../../')
|
|
|
|
/* global describe, it */
|
|
|
|
var o755 = parseInt('755', 8)
|
|
|
|
describe('mkdirp / root', function () {
|
|
it('should', function (done) {
|
|
// '/' on unix, 'c:/' on windows.
|
|
var file = path.resolve(path.sep)
|
|
|
|
fse.mkdirp(file, o755, function (err) {
|
|
if (err) throw err
|
|
fs.stat(file, function (er, stat) {
|
|
if (er) throw er
|
|
assert.ok(stat.isDirectory(), 'target is a directory')
|
|
done()
|
|
})
|
|
})
|
|
})
|
|
})
|