]> git.r.bdr.sh - rbdr/dotfiles/blob
97ad7a2f358e938f97770aba4af820169279d9c2
[rbdr/dotfiles] /
1 var mkdirp = require('../');
2 var path = require('path');
3 var fs = require('fs');
4 var test = require('tap').test;
5
6 test('root', function (t) {
7 // '/' on unix, 'c:/' on windows.
8 var file = path.resolve('/');
9
10 mkdirp(file, 0755, function (err) {
11 if (err) throw err
12 fs.stat(file, function (er, stat) {
13 if (er) throw er
14 t.ok(stat.isDirectory(), 'target is a directory');
15 t.end();
16 })
17 });
18 });