Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const expandJsPaths = (paths) => globExtra.expandPaths(paths, {formats: ['.js']});
module.exports = (opts, config, emitter) => {
const files = filesExist(config.sets, opts.paths)
? opts.paths
: [getGeminiPath(config.system.projectRoot)];
const expandOpts = {formats: ['.js']};
const globOpts = {ignore: config.system.exclude};
return Promise.all([
SetCollection.create(config, opts, expandOpts, globOpts),
globExtra.expandPaths(files, expandOpts, globOpts)
])
.spread((sets, paths) => {
sets.filterFiles(paths);
return loadSuites(sets, emitter);
});
};
.map((set) => {
return globExtra.expandPaths(set.files, expandOpts, globOpts)
.then((files) => _.extend(set, {files}));
})
.thru(Promise.all)