Skip to content

Utility which contains common modules for gemini and hermione.

Notifications You must be signed in to change notification settings

tx44/gemini-core

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gemini-core

Build Status Coverage Status

Utility which contains common modules for gemini and hermione.

Table of Contents

SetsBuilder

Creates mapping of test files with browsers in which they should be run and vice versa.

Example of usage:

const SetsBuilder = require('gemini-core').SetsBuilder;
const sets = {
    desktop: {
        files: ['desktop/tests/**.js'],
        browsers: ['bro1']
    },
    touch-phone: {
        files: ['touch-phone/tests'],
        browsers: ['bro2']
    }
};

SetsBuilder
    .create(sets, {defaultDir: 'default/path'}) // creates setsBuilder using specified tests and options
    .useSets(['desktop']) // use only the specified sets
    .useBrowsers(['bro1']) // use only specified browsers
    .useFiles(['desktop/tests/test.js']) // use only specified files if sets
                                      //and files to use are not specified
    .build('/root', globOpts) // builds a collection of sets with paths expanded according
                                  // to the project root and glob options
    .then((setCollection) => {
        setCollection.groupByFile(); // groups all browsers of test-sets by file:
                                    // {'desktop/tests/test.js': ['bro1']}
        setCollection.groupByBrowser(); // groups all files of test-sets by browser:
                                       // {'bro': ['desktop/tests/test.js']}
    })
    .done();

Options

Returns an object with some options.

const options = require('gemini-core').config.options;

Sets

const sets = options.sets; // returns a section for configparser with two options – files and browsers.
                           // Default value is an empty set - all: {files: []}

About

Utility which contains common modules for gemini and hermione.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%