Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function createJavaScriptFixtures(destination, callback) {
var xfs = mockfs.fs();
var fixtureFolder = path.resolve(destination);
xfs.exists(fixtureFolder, function existsCallback(exists) {
if (exists) {
return callback(new Error('destination folder exists'));
}
mkdirp(fixtureFolder, { fs: xfs, mode: '0755' }, mkdirpCallback);
});
function mkdirpCallback(err) {
if (err) {
return callback(err);
}
async.each(data, writeFixture, function foo(err) {
if (err) {
return callback(err);
}
const nodeFileStorageInitializer = () => {
mockedFs = mockFs.fs({
fileStorage: {}
});
};
file119: 'iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii',
},
dir12: {},
file11: 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa',
file12: 'b',
file13: 'ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc',
},
'mocks/m2': {
file21: 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
},
'mocks/m3': {
}
};
var fs = Promise.promisifyAll(mock.fs(config));
module.exports = fs;
let nodeFileStorageInitializer = () => {
mockedFs = mockFs.fs({
'fileStorage': {}
});
};
get(target, property, receiver) {
if (target.hasOwnProperty(property)) {
return target[property];
} else {
if (target.__internalFs === null) {
target.__internalFs = mockfs.fs();
}
return target.__internalFs[property];
}
},
});
__configureFs: conf => {
container.__internalFs = mockfs.fs(conf);
},
__mockFile: mockfs.file,