pickle-jar 1.4.2 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -24
- package/package.json +15 -12
- package/dist/src/feature-context.d.ts +0 -6
- package/dist/src/feature-context.js +0 -3
- package/dist/src/feature-context.js.map +0 -1
- package/dist/src/feature-file-visitor.d.ts +0 -29
- package/dist/src/feature-file-visitor.js +0 -217
- package/dist/src/feature-file-visitor.js.map +0 -1
- package/dist/src/get-call-sites.d.ts +0 -2
- package/dist/src/get-call-sites.js +0 -12
- package/dist/src/get-call-sites.js.map +0 -1
- package/dist/src/grammar/GherkinLexer.d.ts +0 -46
- package/dist/src/grammar/GherkinLexer.js +0 -245
- package/dist/src/grammar/GherkinLexer.js.map +0 -1
- package/dist/src/grammar/GherkinParser.d.ts +0 -330
- package/dist/src/grammar/GherkinParser.js +0 -2896
- package/dist/src/grammar/GherkinParser.js.map +0 -1
- package/dist/src/grammar/GherkinParserVisitor.d.ts +0 -164
- package/dist/src/grammar/GherkinParserVisitor.js +0 -4
- package/dist/src/grammar/GherkinParserVisitor.js.map +0 -1
- package/dist/src/index.d.ts +0 -8
- package/dist/src/index.js +0 -12
- package/dist/src/index.js.map +0 -1
- package/dist/src/jest-error-listener.d.ts +0 -8
- package/dist/src/jest-error-listener.js +0 -22
- package/dist/src/jest-error-listener.js.map +0 -1
- package/dist/src/step-definition.d.ts +0 -5
- package/dist/src/step-definition.js +0 -3
- package/dist/src/step-definition.js.map +0 -1
- package/dist/src/step-tags.d.ts +0 -7
- package/dist/src/step-tags.js +0 -3
- package/dist/src/step-tags.js.map +0 -1
- package/dist/src/step.d.ts +0 -1
- package/dist/src/step.js +0 -3
- package/dist/src/step.js.map +0 -1
- package/dist/src/tags.d.ts +0 -4
- package/dist/src/tags.js +0 -22
- package/dist/src/tags.js.map +0 -1
- package/dist/src/test-runner.d.ts +0 -3
- package/dist/src/test-runner.js +0 -49
- package/dist/src/test-runner.js.map +0 -1
- package/dist/src/world.d.ts +0 -2
- package/dist/src/world.js +0 -3
- package/dist/src/world.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,4 +1,22 @@
|
|
|
1
1
|
# pickle-jar
|
|
2
|
+
[//]: <> (start placeholder for auto-badger)
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
[](https://npmjs.org/pickle-jar)
|
|
6
|
+
[](https://bundlephobia.com/result?p=pickle-jar)
|
|
7
|
+
[](https://bundlephobia.com/result?p=pickle-jar)
|
|
8
|
+
[](https://github.com/nseba/pickle-jar/blob/master/LICENSE)
|
|
9
|
+
|
|
10
|
+
[](https://libraries.io/npm/pickle-jar)
|
|
11
|
+
[](https://npmcharts.com/compare/pickle-jar)
|
|
12
|
+
[](https://github.com/nseba/pickle-jar/graphs/contributors)
|
|
13
|
+
[](https://github.com/nseba/pickle-jar/blob/master/CODE_OF_CONDUCT.md)
|
|
14
|
+
|
|
15
|
+
[](https://github.com/nseba/pickle-jar/stargazers)
|
|
16
|
+
[](https://github.com/nseba/pickle-jar/fork)
|
|
17
|
+
|
|
18
|
+
[//]: <> (end placeholder for auto-badger)
|
|
19
|
+
|
|
2
20
|
Framework for writing Gherkin features and running them using Jest
|
|
3
21
|
|
|
4
22
|
# Overview
|
|
@@ -42,7 +60,8 @@ In order to run the features and their steps, a test runner entry point must be
|
|
|
42
60
|
Create a file named `runner.ts` in the `<rootDir>/test` directory:
|
|
43
61
|
|
|
44
62
|
```ts
|
|
45
|
-
import {
|
|
63
|
+
import {workerData} from "worker_threads";
|
|
64
|
+
import {StepDefinition, testRunner} from "../src";
|
|
46
65
|
|
|
47
66
|
interface World {
|
|
48
67
|
password: string | undefined;
|
|
@@ -63,20 +82,11 @@ const stepDefinitions: StepDefinition<World>[] = [{
|
|
|
63
82
|
}
|
|
64
83
|
}];
|
|
65
84
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
// The FeatureContext object contains information about the feature file being processed
|
|
70
|
-
function worldFactory(featureContext: FeatureContext): World {
|
|
71
|
-
const world: World = {
|
|
72
|
-
password: undefined,
|
|
73
|
-
grantedAccess: false
|
|
74
|
-
}
|
|
75
|
-
return world;
|
|
85
|
+
const world: World = {
|
|
86
|
+
password: undefined,
|
|
87
|
+
grantedAccess: false
|
|
76
88
|
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
testRunner<World>(`${__dirname}/features/**/*.feature`, stepDefinitions, worldFactory);
|
|
89
|
+
testRunner<World>(`${__dirname}/features/**/*.feature`, stepDefinitions, world);
|
|
80
90
|
```
|
|
81
91
|
|
|
82
92
|
The test runner file defines the World object structure. This object is passed to each step and allows sharing values from one step to another.
|
|
@@ -112,7 +122,8 @@ Feature: Logging in
|
|
|
112
122
|
```
|
|
113
123
|
### `runner.ts` steps:
|
|
114
124
|
```ts
|
|
115
|
-
import {
|
|
125
|
+
import {workerData} from "worker_threads";
|
|
126
|
+
import {StepDefinition, testRunner} from "../src";
|
|
116
127
|
|
|
117
128
|
interface World {
|
|
118
129
|
password: string | undefined;
|
|
@@ -133,16 +144,11 @@ const stepDefinitions: StepDefinition<World>[] = [{
|
|
|
133
144
|
}
|
|
134
145
|
}];
|
|
135
146
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
grantedAccess: false
|
|
140
|
-
}
|
|
141
|
-
return world;
|
|
147
|
+
const world: World = {
|
|
148
|
+
password: undefined,
|
|
149
|
+
grantedAccess: false
|
|
142
150
|
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
testRunner<World>(`${__dirname}/features/**/*.feature`, stepDefinitions, worldFactory);
|
|
151
|
+
testRunner<World>(`${__dirname}/features/**/*.feature`, stepDefinitions, world);
|
|
146
152
|
```
|
|
147
153
|
|
|
148
154
|
## Running scenario outlines
|
package/package.json
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pickle-jar",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"main": "dist/src/index.js",
|
|
5
5
|
"types": "dist/src/index.d.ts",
|
|
6
|
-
"repository":
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git@github0.com:nseba/pickle-jar.git"
|
|
9
|
+
},
|
|
7
10
|
"homepage": "https://github.com/nseba/pickle-jar",
|
|
8
11
|
"author": "Sebastian Negomireanu",
|
|
9
12
|
"license": "MIT",
|
|
@@ -15,18 +18,18 @@
|
|
|
15
18
|
"devDependencies": {
|
|
16
19
|
"@types/glob": "^8.1.0",
|
|
17
20
|
"@types/jest": "^29.5.4",
|
|
18
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
19
|
-
"@typescript-eslint/parser": "^
|
|
20
|
-
"antlr4": "^4.13.
|
|
21
|
+
"@typescript-eslint/eslint-plugin": "^8.4.0",
|
|
22
|
+
"@typescript-eslint/parser": "^8.4.0",
|
|
23
|
+
"antlr4": "^4.13.2",
|
|
21
24
|
"antlr4ts": "^0.5.0-alpha.4",
|
|
22
25
|
"antlr4ts-cli": "^0.5.0-alpha.4",
|
|
23
|
-
"eslint": "^
|
|
24
|
-
"eslint-config-prettier": "^
|
|
25
|
-
"glob": "^
|
|
26
|
-
"jest": "^29.
|
|
27
|
-
"ts-jest": "^29.
|
|
28
|
-
"tsc-watch": "^6.0
|
|
29
|
-
"typescript": "^
|
|
26
|
+
"eslint": "^9.9.1",
|
|
27
|
+
"eslint-config-prettier": "^9.1.0",
|
|
28
|
+
"glob": "^11.0.0",
|
|
29
|
+
"jest": "^29.7.0",
|
|
30
|
+
"ts-jest": "^29.2.5",
|
|
31
|
+
"tsc-watch": "^6.2.0",
|
|
32
|
+
"typescript": "^5.5.4"
|
|
30
33
|
},
|
|
31
34
|
"peerDependencies": {
|
|
32
35
|
"antlr4": "^4.13.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"feature-context.js","sourceRoot":"","sources":["../../src/feature-context.ts"],"names":[],"mappings":""}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { AbstractParseTreeVisitor } from "antlr4ts/tree";
|
|
2
|
-
import { BackgroundContext, FeatureContext, FeatureFileContext, ScenarioContext, ScenarioOutlineContext } from "./grammar/GherkinParser";
|
|
3
|
-
import { GherkinParserVisitor } from "./grammar/GherkinParserVisitor";
|
|
4
|
-
import { StepDefinition } from "./step-definition";
|
|
5
|
-
import { WorldFactory } from "./world";
|
|
6
|
-
import { FeatureContext as PickleFeatureContext } from "./feature-context";
|
|
7
|
-
interface WorldObject<TWorld> {
|
|
8
|
-
world: TWorld;
|
|
9
|
-
}
|
|
10
|
-
export declare class FeatureFileVisitor<TWorld> extends AbstractParseTreeVisitor<void> implements GherkinParserVisitor<void> {
|
|
11
|
-
private readonly worldFactory;
|
|
12
|
-
private readonly stepDefinitions;
|
|
13
|
-
private tagFilter;
|
|
14
|
-
private readonly featureContext;
|
|
15
|
-
constructor(worldFactory: WorldFactory<TWorld>, stepDefinitions: StepDefinition<TWorld>[], tagFilter: (tags: string[]) => boolean, featureContext: PickleFeatureContext);
|
|
16
|
-
visitFeatureFile(ctx: FeatureFileContext): void;
|
|
17
|
-
visitFeature(ctx: FeatureContext): void;
|
|
18
|
-
visitScenario(ctx: ScenarioContext, worldObject?: WorldObject<TWorld>): void;
|
|
19
|
-
setupBackground(backgroundCtx: BackgroundContext, ctx: FeatureContext): void;
|
|
20
|
-
visitScenarioOutline(ctx: ScenarioOutlineContext, worldObject?: WorldObject<TWorld>): void;
|
|
21
|
-
protected defaultResult(): void;
|
|
22
|
-
private replaceKeywords;
|
|
23
|
-
private runNextStep;
|
|
24
|
-
private defineTestStep;
|
|
25
|
-
private definePrepareStep;
|
|
26
|
-
private extractTestArgs;
|
|
27
|
-
private getMatchingStepDefinition;
|
|
28
|
-
}
|
|
29
|
-
export {};
|
|
@@ -1,217 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FeatureFileVisitor = void 0;
|
|
4
|
-
const tree_1 = require("antlr4ts/tree");
|
|
5
|
-
const os_1 = require("os");
|
|
6
|
-
const GherkinParser_1 = require("./grammar/GherkinParser");
|
|
7
|
-
const tags_1 = require("./tags");
|
|
8
|
-
class FeatureFileVisitor extends tree_1.AbstractParseTreeVisitor {
|
|
9
|
-
constructor(worldFactory, stepDefinitions, tagFilter, featureContext) {
|
|
10
|
-
super();
|
|
11
|
-
this.worldFactory = worldFactory;
|
|
12
|
-
this.stepDefinitions = stepDefinitions;
|
|
13
|
-
this.tagFilter = tagFilter;
|
|
14
|
-
this.featureContext = featureContext;
|
|
15
|
-
}
|
|
16
|
-
visitFeatureFile(ctx) {
|
|
17
|
-
this.visitChildren(ctx);
|
|
18
|
-
}
|
|
19
|
-
visitFeature(ctx) {
|
|
20
|
-
const { tags, isOnly, isSkip } = (0, tags_1.extractTags)(ctx.tags());
|
|
21
|
-
if (!this.tagFilter(tags)) {
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
const describeFunc = isOnly ? describe.only : isSkip ? describe.skip : describe;
|
|
25
|
-
describeFunc(`Feature: ${ctx.multilineText().text.trim()}`, () => {
|
|
26
|
-
const backgroundCtx = ctx.background();
|
|
27
|
-
if (backgroundCtx) {
|
|
28
|
-
this.setupBackground(backgroundCtx, ctx);
|
|
29
|
-
}
|
|
30
|
-
else {
|
|
31
|
-
this.visitChildren(ctx);
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
visitScenario(ctx, worldObject) {
|
|
36
|
-
const { tags, isOnly, isSkip } = (0, tags_1.extractTags)(ctx.tags());
|
|
37
|
-
if (!this.tagFilter(tags)) {
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
const describeFunc = isOnly ? describe.only : isSkip ? describe.skip : describe;
|
|
41
|
-
describeFunc(`Scenario: ${ctx.multilineText().text.trim()}`, () => {
|
|
42
|
-
const worldObj = {};
|
|
43
|
-
beforeEach(() => {
|
|
44
|
-
if (!worldObject) {
|
|
45
|
-
worldObj.world = this.worldFactory(this.featureContext);
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
const step = ctx.step();
|
|
49
|
-
const steps = [step.givenStep(), ...step.andGivenStep(), step.whenStep(), ...step.andWhenStep(), step.thenStep(), ...step.andStep(), ...step.butStep()];
|
|
50
|
-
this.runNextStep(steps, undefined, worldObject !== null && worldObject !== void 0 ? worldObject : worldObj);
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
setupBackground(backgroundCtx, ctx) {
|
|
54
|
-
const { tags, isOnly, isSkip } = (0, tags_1.extractTags)(backgroundCtx.tags());
|
|
55
|
-
if (!this.tagFilter(tags)) {
|
|
56
|
-
return;
|
|
57
|
-
}
|
|
58
|
-
const describeFunc = isOnly ? describe.only : isSkip ? describe.skip : describe;
|
|
59
|
-
describeFunc(`Background: ${backgroundCtx.multilineText().text.trim()}`, () => {
|
|
60
|
-
const worldObj = {};
|
|
61
|
-
beforeEach(() => {
|
|
62
|
-
worldObj.world = this.worldFactory(this.featureContext);
|
|
63
|
-
});
|
|
64
|
-
const steps = [backgroundCtx.givenStep(), ...backgroundCtx.andGivenStep(), ...ctx.scenario(), ...ctx.scenarioOutline()];
|
|
65
|
-
this.runNextStep(steps, undefined, worldObj);
|
|
66
|
-
//
|
|
67
|
-
// const scenarios = [...backgroundCtx.scenario(), ...backgroundCtx.scenarioOutline()];
|
|
68
|
-
// for (const scenario of scenarios) {
|
|
69
|
-
// const steps = [backgroundCtx.givenStep(), ...backgroundCtx.andGivenStep(), scenario];
|
|
70
|
-
//
|
|
71
|
-
// this.runNextStep(steps, undefined, worldObj);
|
|
72
|
-
// }
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
visitScenarioOutline(ctx, worldObject) {
|
|
76
|
-
const { tags, isOnly, isSkip } = (0, tags_1.extractTags)(ctx.tags());
|
|
77
|
-
if (!this.tagFilter(tags)) {
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
const describeFunc = isOnly ? describe.only : isSkip ? describe.skip : describe;
|
|
81
|
-
const cellNames = ctx.examplesBlock().tableHeader().tableRow().cell().map(cell => cell.text.trim());
|
|
82
|
-
const values = ctx.examplesBlock().tableRow().map(row => row.cell().map(cell => cell.text.trim()));
|
|
83
|
-
const valueMap = values.map(row => {
|
|
84
|
-
const item = {};
|
|
85
|
-
for (let i = 0; i < row.length; ++i) {
|
|
86
|
-
item[cellNames[i]] = row[i];
|
|
87
|
-
}
|
|
88
|
-
return item;
|
|
89
|
-
});
|
|
90
|
-
const scenarioName = ctx.multilineText().text.trim();
|
|
91
|
-
describeFunc(`Scenario outline: ${scenarioName}`, () => {
|
|
92
|
-
const worldObj = {};
|
|
93
|
-
beforeEach(() => {
|
|
94
|
-
if (!worldObject) {
|
|
95
|
-
worldObj.world = this.worldFactory(this.featureContext);
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
for (const row of valueMap) {
|
|
99
|
-
const step = ctx.step();
|
|
100
|
-
const steps = [step.givenStep(), ...step.andGivenStep(), step.whenStep(), ...step.andWhenStep(), step.thenStep(), ...step.andStep(), ...step.butStep()];
|
|
101
|
-
this.runNextStep(steps, row, worldObject !== null && worldObject !== void 0 ? worldObject : worldObj);
|
|
102
|
-
}
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
defaultResult() {
|
|
106
|
-
return;
|
|
107
|
-
}
|
|
108
|
-
replaceKeywords(input, replacements) {
|
|
109
|
-
return input
|
|
110
|
-
.replace(/<([^>]+)>/g, (match, keyword) => {
|
|
111
|
-
const replacement = replacements === null || replacements === void 0 ? void 0 : replacements[keyword];
|
|
112
|
-
return replacement !== undefined ? replacement.replace(/\$/g, "\\$") : match;
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
runNextStep(steps, valueMap, worldObject) {
|
|
116
|
-
var _a;
|
|
117
|
-
const step = steps.shift();
|
|
118
|
-
if (!step) {
|
|
119
|
-
return;
|
|
120
|
-
}
|
|
121
|
-
if (step instanceof GherkinParser_1.ScenarioContext) {
|
|
122
|
-
this.visitScenario(step, worldObject);
|
|
123
|
-
return;
|
|
124
|
-
}
|
|
125
|
-
else if (step instanceof GherkinParser_1.ScenarioOutlineContext) {
|
|
126
|
-
this.visitScenarioOutline(step, worldObject);
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
let tags;
|
|
130
|
-
let prefix;
|
|
131
|
-
let prepare = true;
|
|
132
|
-
if (step instanceof GherkinParser_1.GivenStepContext || step instanceof GherkinParser_1.AndGivenStepContext) {
|
|
133
|
-
prefix = 'Given';
|
|
134
|
-
tags = (0, tags_1.extractTags)(step.tags());
|
|
135
|
-
}
|
|
136
|
-
else if (step instanceof GherkinParser_1.WhenStepContext || step instanceof GherkinParser_1.AndWhenStepContext) {
|
|
137
|
-
prefix = 'When';
|
|
138
|
-
tags = (0, tags_1.extractTags)(step.tags());
|
|
139
|
-
}
|
|
140
|
-
else if (step instanceof GherkinParser_1.ThenStepContext || step instanceof GherkinParser_1.AndStepContext) {
|
|
141
|
-
prefix = "Then";
|
|
142
|
-
prepare = false;
|
|
143
|
-
tags = (0, tags_1.extractTestTags)(step.thenTags());
|
|
144
|
-
}
|
|
145
|
-
else {
|
|
146
|
-
prefix = 'But';
|
|
147
|
-
prepare = false;
|
|
148
|
-
tags = (0, tags_1.extractTestTags)(step.thenTags());
|
|
149
|
-
}
|
|
150
|
-
if (!this.tagFilter(tags.tags)) {
|
|
151
|
-
return;
|
|
152
|
-
}
|
|
153
|
-
const name = `${prefix} ${this.replaceKeywords(step.multilineText().text.trim(), valueMap)}`;
|
|
154
|
-
const { match, step: stepCall } = this.getMatchingStepDefinition(name, !!tags.isTodo);
|
|
155
|
-
const docStringContents = (_a = step.docString()) === null || _a === void 0 ? void 0 : _a.DOC_STRING().text;
|
|
156
|
-
const args = this.extractTestArgs(match, name, docStringContents, valueMap);
|
|
157
|
-
if (prepare) {
|
|
158
|
-
this.definePrepareStep(name, stepCall, args, steps, valueMap, worldObject, tags);
|
|
159
|
-
}
|
|
160
|
-
else {
|
|
161
|
-
this.defineTestStep(name, stepCall, args, steps, valueMap, worldObject, tags);
|
|
162
|
-
}
|
|
163
|
-
}
|
|
164
|
-
defineTestStep(name, stepCall, args, steps, valueMap, worldObject, tags) {
|
|
165
|
-
const itFunc = tags.isOnly ? it.only : tags.isSkip ? it.skip : tags.isTodo ? it.todo : tags.isFail ? it.failing : it;
|
|
166
|
-
if (tags.isTodo) {
|
|
167
|
-
itFunc(name);
|
|
168
|
-
}
|
|
169
|
-
else {
|
|
170
|
-
itFunc(name, () => {
|
|
171
|
-
stepCall(worldObject.world, ...args);
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
this.runNextStep(steps, valueMap, worldObject);
|
|
175
|
-
}
|
|
176
|
-
definePrepareStep(name, stepCall, args, steps, valueMap, worldObject, tags) {
|
|
177
|
-
const describeFunc = tags.isOnly ? describe.only : tags.isSkip ? describe.skip : describe;
|
|
178
|
-
describeFunc(name, () => {
|
|
179
|
-
beforeEach(() => {
|
|
180
|
-
stepCall(worldObject.world, ...args);
|
|
181
|
-
});
|
|
182
|
-
this.runNextStep(steps, valueMap, worldObject);
|
|
183
|
-
});
|
|
184
|
-
}
|
|
185
|
-
extractTestArgs(match, name, docStringContents, valueMap) {
|
|
186
|
-
let args = [];
|
|
187
|
-
const matchResults = match.exec(name);
|
|
188
|
-
if (matchResults) {
|
|
189
|
-
args = matchResults.slice(1);
|
|
190
|
-
}
|
|
191
|
-
if (docStringContents) {
|
|
192
|
-
const cleanedDocstring = this.replaceKeywords(docStringContents
|
|
193
|
-
.trim()
|
|
194
|
-
.replace(/^"""/, "")
|
|
195
|
-
.replace(/"""$/, "")
|
|
196
|
-
.split(/((\r\n)|\r|\n)]/)
|
|
197
|
-
.map(line => line.trim()).join(os_1.EOL), valueMap);
|
|
198
|
-
args.push(cleanedDocstring);
|
|
199
|
-
}
|
|
200
|
-
return args;
|
|
201
|
-
}
|
|
202
|
-
getMatchingStepDefinition(name, provideNopBoilerplate) {
|
|
203
|
-
var _a;
|
|
204
|
-
const matchingStepDefinitions = this.stepDefinitions.filter(def => {
|
|
205
|
-
return def.match.test(name);
|
|
206
|
-
});
|
|
207
|
-
if (!matchingStepDefinitions.length && !provideNopBoilerplate) {
|
|
208
|
-
throw new Error(`Missing step definition '${name}'`);
|
|
209
|
-
}
|
|
210
|
-
else if (matchingStepDefinitions.length > 1) {
|
|
211
|
-
throw new Error(`Multiple step definition match '${name}':\n${matchingStepDefinitions.map(rule => rule.match.toString()).join("\n")}`);
|
|
212
|
-
}
|
|
213
|
-
return (_a = matchingStepDefinitions[0]) !== null && _a !== void 0 ? _a : { match: /^.*$/, step: undefined };
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
exports.FeatureFileVisitor = FeatureFileVisitor;
|
|
217
|
-
//# sourceMappingURL=feature-file-visitor.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"feature-file-visitor.js","sourceRoot":"","sources":["../../src/feature-file-visitor.ts"],"names":[],"mappings":";;;AAAA,wCAAuD;AACvD,2BAAuB;AACvB,2DAYiC;AAGjC,iCAAoD;AAapD,MAAa,kBAA2B,SAAQ,+BAA8B;IAC1E,YACqB,YAAkC,EAClC,eAAyC,EAClD,SAAsC,EAC7B,cAAoC;QACrD,KAAK,EAAE,CAAC;QAJS,iBAAY,GAAZ,YAAY,CAAsB;QAClC,oBAAe,GAAf,eAAe,CAA0B;QAClD,cAAS,GAAT,SAAS,CAA6B;QAC7B,mBAAc,GAAd,cAAc,CAAsB;IAEzD,CAAC;IAEM,gBAAgB,CAAC,GAAuB;QAC3C,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;IAC5B,CAAC;IAGM,YAAY,CAAC,GAAmB;QACnC,MAAM,EAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAC,GAAG,IAAA,kBAAW,EAAC,GAAG,CAAC,IAAI,EAAE,CAA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AAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;SAC1I;QACD,OAAO,MAAA,uBAAuB,CAAC,CAAC,CAAC,mCAAI,EAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAC,CAAC;IAC1E,CAAC;CACJ;AA5PD,gDA4PC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getCallSites = void 0;
|
|
4
|
-
function getCallSites() {
|
|
5
|
-
const oldPrepareStackTrace = Error.prepareStackTrace;
|
|
6
|
-
Error.prepareStackTrace = (_, stack) => stack;
|
|
7
|
-
const stack = new Error().stack.slice(1);
|
|
8
|
-
Error.prepareStackTrace = oldPrepareStackTrace;
|
|
9
|
-
return stack;
|
|
10
|
-
}
|
|
11
|
-
exports.getCallSites = getCallSites;
|
|
12
|
-
//# sourceMappingURL=get-call-sites.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-call-sites.js","sourceRoot":"","sources":["../../src/get-call-sites.ts"],"names":[],"mappings":";;;AAAA,SAAgB,YAAY;IACxB,MAAM,oBAAoB,GAAG,KAAK,CAAC,iBAAiB,CAAC;IACrD,KAAK,CAAC,iBAAiB,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC;IAC9C,MAAM,KAAK,GAAI,IAAI,KAAK,EAAE,CAAC,KAAsC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC3E,KAAK,CAAC,iBAAiB,GAAG,oBAAoB,CAAC;IAC/C,OAAO,KAAK,CAAC;AACjB,CAAC;AAND,oCAMC"}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { ATN } from "antlr4ts/atn/ATN";
|
|
2
|
-
import { CharStream } from "antlr4ts/CharStream";
|
|
3
|
-
import { Lexer } from "antlr4ts/Lexer";
|
|
4
|
-
import { Vocabulary } from "antlr4ts/Vocabulary";
|
|
5
|
-
export declare class GherkinLexer extends Lexer {
|
|
6
|
-
static readonly FEATURE = 1;
|
|
7
|
-
static readonly SCENARIO = 2;
|
|
8
|
-
static readonly SCENARIO_OUTLINE = 3;
|
|
9
|
-
static readonly GIVEN = 4;
|
|
10
|
-
static readonly AND_GIVEN = 5;
|
|
11
|
-
static readonly WHEN = 6;
|
|
12
|
-
static readonly AND_WHEN = 7;
|
|
13
|
-
static readonly THEN = 8;
|
|
14
|
-
static readonly AND = 9;
|
|
15
|
-
static readonly BUT = 10;
|
|
16
|
-
static readonly EXAMPLES = 11;
|
|
17
|
-
static readonly BACKGROUND = 12;
|
|
18
|
-
static readonly PIPE = 13;
|
|
19
|
-
static readonly ONLY_TAG = 14;
|
|
20
|
-
static readonly SKIP_TAG = 15;
|
|
21
|
-
static readonly TODO_TAG = 16;
|
|
22
|
-
static readonly FAIL_TAG = 17;
|
|
23
|
-
static readonly TAG = 18;
|
|
24
|
-
static readonly COMMENT = 19;
|
|
25
|
-
static readonly TEXT_CHARACTER = 20;
|
|
26
|
-
static readonly NEWLINE = 21;
|
|
27
|
-
static readonly WSS = 22;
|
|
28
|
-
static readonly DOC_STRING = 23;
|
|
29
|
-
static readonly TEXT_CHARACTER_MODE = 1;
|
|
30
|
-
static readonly channelNames: string[];
|
|
31
|
-
static readonly modeNames: string[];
|
|
32
|
-
static readonly ruleNames: string[];
|
|
33
|
-
private static readonly _LITERAL_NAMES;
|
|
34
|
-
private static readonly _SYMBOLIC_NAMES;
|
|
35
|
-
static readonly VOCABULARY: Vocabulary;
|
|
36
|
-
get vocabulary(): Vocabulary;
|
|
37
|
-
constructor(input: CharStream);
|
|
38
|
-
get grammarFileName(): string;
|
|
39
|
-
get ruleNames(): string[];
|
|
40
|
-
get serializedATN(): string;
|
|
41
|
-
get channelNames(): string[];
|
|
42
|
-
get modeNames(): string[];
|
|
43
|
-
static readonly _serializedATN: string;
|
|
44
|
-
static __ATN: ATN;
|
|
45
|
-
static get _ATN(): ATN;
|
|
46
|
-
}
|