Sha256: 8bf6c12bd9b99c6ecb8747b51ebc28214b496677c48a90607a0243f081d975ea
Contents?: true
Size: 826 Bytes
Versions: 581
Compression:
Stored size: 826 Bytes
Contents
var mkdirp = require('../'); var path = require('path'); var fs = require('fs'); var test = require('tap').test; test('return value', function (t) { t.plan(4); var x = Math.floor(Math.random() * Math.pow(16,4)).toString(16); var y = Math.floor(Math.random() * Math.pow(16,4)).toString(16); var z = Math.floor(Math.random() * Math.pow(16,4)).toString(16); var file = '/tmp/' + [x,y,z].join('/'); // should return the first dir created. // By this point, it would be profoundly surprising if /tmp didn't // already exist, since every other test makes things in there. mkdirp(file, function (err, made) { t.ifError(err); t.equal(made, '/tmp/' + x); mkdirp(file, function (err, made) { t.ifError(err); t.equal(made, null); }); }); });
Version data entries
581 entries across 326 versions & 38 rubygems