How to use the gemini-core.SetsBuilder.create function in gemini-core

To help you get started, we’ve selected a few gemini-core 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 gemini-testing / hermione / lib / test-reader / index.js View on Github external
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();
    }
github gemini-testing / gemini / lib / test-reader.js View on Github external
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));
};
github gemini-testing / hermione / lib / sets.js View on Github external
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());
};