Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async read({paths, browsers, ignore, sets, grep} = {}) {
const setCollection = await SetsBuilder
.create(this._config.sets, {defaultDir: require('../../package').name})
.useFiles(paths)
.useSets(sets)
.useBrowsers(browsers)
.build(process.cwd(), {ignore});
TestParser.prepare();
const filesByBro = setCollection.groupByBrowser();
return _(filesByBro)
.mapValues((files, browserId) => ({parser: this._makeParser(browserId, grep), files}))
.mapValues(({parser, files}) => parser.loadFiles(files))
.mapValues((parser) => parser.parse())
.value();
}
module.exports = (emitter, config, opts) => {
return SetsBuilder
.create(config.sets, {defaultDir: DEFAULT_DIR})
.useSets(opts.sets)
.useFiles(opts.paths)
.useBrowsers(opts.browsers)
.build(config.system.projectRoot, {ignore: config.system.exclude})
.then((setCollection) => loadSuites(setCollection, emitter, config));
};
exports.reveal = (cfgSets, opts) => {
const {sets, paths, browsers, ignore} = opts;
return SetsBuilder
.create(cfgSets, {defaultDir: DEFAULT_DIR})
.useSets(sets)
.useFiles(paths)
.useBrowsers(browsers)
.build(process.cwd(), {ignore})
.then((setCollection) => setCollection.groupByBrowser());
};