Use more accurate ensureDirSync

This commit is contained in:
Mariusz Nowak 2019-06-04 14:37:03 +02:00
parent 0b801a6aca
commit 25dec543af
No known key found for this signature in database
GPG Key ID: B1FBDA8A182B03F2

View File

@ -24,7 +24,7 @@ const { join } = require('path');
const os = require('os');
const Spec = require('mocha/lib/reporters/spec');
const Runner = require('mocha/lib/runner');
const { mkdirsSync, removeSync } = require('fs-extra');
const { ensureDirSync, removeSync } = require('fs-extra');
const { tmpDirCommonPath } = require('../tests/utils/fs');
// Ensure faster tests propagation
@ -50,7 +50,7 @@ os.homedir = () => tmpDirCommonPath;
if (process.env.USERPROFILE) process.env.USERPROFILE = tmpDirCommonPath;
if (process.env.HOME) process.env.HOME = tmpDirCommonPath;
mkdirsSync(tmpDirCommonPath); // Ensure temporary homedir exists
ensureDirSync(tmpDirCommonPath); // Ensure temporary homedir exists
module.exports = class ServerlessSpec extends Spec {
constructor(runner) {