How to use the gemini-core.SetsBuilder.prototype 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 / test / lib / test-reader / index.js View on Github external
it('should return parsed tests grouped by browser', async () => {
            const groupByBrowser = sinon.stub().returns({
                bro1: ['file1'],
                bro2: ['file2']
            });
            SetsBuilder.prototype.build.resolves({groupByBrowser});

            const test1 = {title: 'test1'};
            const test2 = {title: 'test2'};
            const test3 = {title: 'test3'};
            const test4 = {title: 'test4'};

            TestParser.prototype.loadFiles
                .withArgs(['file1']).callsFake(function() {
                    this._tests = [test1, test2];
                    return this;
                })
                .withArgs(['file2']).callsFake(function() {
                    this._tests = [test3, test4];
                    return this;
                });
github gemini-testing / gemini / test / unit / test-reader.js View on Github external
beforeEach(() => {
        sandbox.stub(utils, 'requireWithNoCache');
        sandbox.stub(globExtra, 'expandPaths').returns(Promise.resolve([]));
        sandbox.stub(SetsBuilder.prototype, 'useFiles').returnsThis();
        sandbox.stub(SetsBuilder.prototype, 'useSets').returnsThis();
        sandbox.stub(SetsBuilder.prototype, 'useBrowsers').returnsThis();

        const groupByFile = () => {
            return {
                '/some/path/file1.js': [],
                '/other/path/file2.js': []
            };
        };
        sandbox.stub(SetsBuilder.prototype, 'build').returns(Promise.resolve({groupByFile}));
        testsApi = sandbox.stub();
        readTests = proxyquire('lib/test-reader', {
            './tests-api': testsApi
        });
    });
github gemini-testing / hermione / test / lib / test-reader / index.js View on Github external
beforeEach(() => {
        sandbox.spy(SetsBuilder, 'create');
        sandbox.stub(SetsBuilder.prototype, 'useFiles').returnsThis();
        sandbox.stub(SetsBuilder.prototype, 'useSets').returnsThis();
        sandbox.stub(SetsBuilder.prototype, 'useBrowsers').returnsThis();

        sandbox.stub(SetsBuilder.prototype, 'build').resolves({groupByBrowser: () => ({})});

        sandbox.stub(TestParser, 'prepare');
        sandbox.spy(TestParser, 'create');
        sandbox.stub(TestParser.prototype, 'applySkip').returnsThis();
        sandbox.stub(TestParser.prototype, 'applyConfigController').returnsThis();
        sandbox.stub(TestParser.prototype, 'applyGrep').returnsThis();
        sandbox.stub(TestParser.prototype, 'loadFiles').returnsThis();
        sandbox.stub(TestParser.prototype, 'parse');

        sandbox.spy(TestSkipper, 'create');
    });
github gemini-testing / gemini / test / unit / test-reader.js View on Github external
beforeEach(() => {
        sandbox.stub(utils, 'requireWithNoCache');
        sandbox.stub(globExtra, 'expandPaths').returns(Promise.resolve([]));
        sandbox.stub(SetsBuilder.prototype, 'useFiles').returnsThis();
        sandbox.stub(SetsBuilder.prototype, 'useSets').returnsThis();
        sandbox.stub(SetsBuilder.prototype, 'useBrowsers').returnsThis();

        const groupByFile = () => {
            return {
                '/some/path/file1.js': [],
                '/other/path/file2.js': []
            };
        };
        sandbox.stub(SetsBuilder.prototype, 'build').returns(Promise.resolve({groupByFile}));
        testsApi = sandbox.stub();
        readTests = proxyquire('lib/test-reader', {
            './tests-api': testsApi
        });
    });
github gemini-testing / gemini / test / unit / test-reader.js View on Github external
.then(() => {
                    assert.callOrder(
                        createSetsBuilder,
                        SetsBuilder.prototype.useSets,
                        SetsBuilder.prototype.useFiles,
                        SetsBuilder.prototype.useBrowsers,
                        SetsBuilder.prototype.build
                    );
                });
        });