How to use the mkdirp.mkdirP function in mkdirp

To help you get started, we’ve selected a few mkdirp examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github abecms / abecms / tests / unit / core / utils / file.js View on Github external
it('coreUtils.file.addFolder()', function() {
    this.sinon = sinon.sandbox.create();
    var stub = sinon.stub(mkdirp, 'mkdirP')
    stub.returns({'test':'test'});
    var result = coreUtils.file.addFolder('path/to/folder')
    chai.expect(result).to.be.a('string')
    chai.expect(result).to.equal('path/to/folder')
    mkdirp.mkdirP.restore()
  });

mkdirp

Recursively mkdir, like `mkdir -p`

MIT
Latest version published 2 years ago

Package Health Score

67 / 100
Full package analysis