How to use the gherkin-ast.TableCell function in gherkin-ast

To help you get started, we’ve selected a few gherkin-ast 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 gherking / gherking / test / builtIn / RemoveDuplicates.spec.js View on Github external
it('should not display anything if verbose turned off even if duplicate row found', () => {
                const compiler = new RemoveDuplicates({
                    processRows: true,
                    verbose: false
                });
                const examples = new Examples();
                const row = new TableRow();
                row.cells.push(new TableCell('hello'));
                row.cells.push(new TableCell('world'));
                examples.body.push(row);
                examples.body.push(row.clone());
                compiler._filterRows(examples, {}, {});

                expect(console.log.called, 'console.log is called').to.be.false;
                expect(console.warn.called, 'console.warn is called').to.be.false;
            })
        });
github gherking / gherking / test / builtIn / RemoveDuplicates.spec.js View on Github external
it('should not display anything if verbose turned off even if duplicate row found', () => {
                const compiler = new RemoveDuplicates({
                    processRows: true,
                    verbose: false
                });
                const examples = new Examples();
                const row = new TableRow();
                row.cells.push(new TableCell('hello'));
                row.cells.push(new TableCell('world'));
                examples.body.push(row);
                examples.body.push(row.clone());
                compiler._filterRows(examples, {}, {});

                expect(console.log.called, 'console.log is called').to.be.false;
                expect(console.warn.called, 'console.warn is called').to.be.false;
            })
        });
github gherking / gherking / lib / builtIn / ScenarioOutlineNumbering.js View on Github external
onExampleHeader(header, parent) {
        if (this.config.addNumbering) {
            const fieldExists = header.cells.some(cell => {
                return cell.value === NUMBERING_COLUMN;
            });
            if (fieldExists) {
                console.warn('The default numbering field already exists in Scenario Outline: ' + parent.name);
            }
            header.cells.unshift(new TableCell(NUMBERING_COLUMN));
        }
    }
github gherking / gherking / lib / builtIn / ScenarioOutlineNumbering.js View on Github external
onExampleRow(row, parent, i) {
        if (this.config.addNumbering) {
            row.cells.unshift(new TableCell(String(i + 1)));
        }
    }
}

gherkin-ast

JS model for Gherkin feature files

MIT
Latest version published 10 months ago

Package Health Score

67 / 100
Full package analysis