1 | var fs = require('../lib/fs');
|
2 | var assert = require('assert');
|
3 |
|
4 | /**
|
5 | * Tests the recursive creation of a directory
|
6 | */
|
7 | exports.testRecursiveMkdir = function() {
|
8 | fs.mkdir('/tmp/example_dir/first/second/third/fourth/fifth', 0777, true, function (err) {
|
9 | assert.isUndefined(err);
|
10 | });
|
11 | }
|
12 |
|
13 | exports.testRecursiveSyncMkdir = function() {
|
14 | try {
|
15 | fs.mkdirSync('/tmp/example_sync/first/second/third/fourth/fifth', 0777, true);
|
16 | } catch (e) {
|
17 | console.log(e);
|
18 | }
|
19 | }
|