How to use the gherkin-ast.Examples 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 remove duplicate rows', () => {
            const compiler = new RemoveDuplicates({
                processRows: true
            });
            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());

            expect(examples.body).to.have.lengthOf(2);

            compiler._filterRows(examples, {}, {});

            expect(examples.body).to.have.lengthOf(1);
        });

gherkin-ast

JS model for Gherkin feature files

MIT
Latest version published 4 months ago

Package Health Score

73 / 100
Full package analysis