@qavajs/cypress-runner-adapter 0.1.0 → 0.1.1
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/CHANGELOG.md +3 -0
- package/adapter/index.js +2 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/adapter/index.js
CHANGED
|
@@ -5,7 +5,7 @@ const {
|
|
|
5
5
|
} = require('fs-extra');
|
|
6
6
|
const { randomUUID } = require('node:crypto');
|
|
7
7
|
const { AstBuilder, compile, GherkinClassicTokenMatcher, Parser } = require('@cucumber/gherkin');
|
|
8
|
-
const
|
|
8
|
+
const webpackPreprocessor = require('@cypress/webpack-preprocessor')();
|
|
9
9
|
|
|
10
10
|
const uuidFn = () => randomUUID();
|
|
11
11
|
const builder = new AstBuilder(uuidFn)
|
|
@@ -117,7 +117,7 @@ function adapter(testCases) {
|
|
|
117
117
|
module.exports = async function cucumber(file) {
|
|
118
118
|
const { filePath, outputPath, shouldWatch } = file;
|
|
119
119
|
if (!filePath.endsWith('.feature')) {
|
|
120
|
-
return
|
|
120
|
+
return webpackPreprocessor(file)
|
|
121
121
|
}
|
|
122
122
|
const gherkinDocument = parser.parse(readFileSync(filePath, 'utf-8'));
|
|
123
123
|
const testCases = compile(gherkinDocument, filePath, uuidFn);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@qavajs/cypress-runner-adapter",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"debug": "cypress open --config-file test/cypress.config.js",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"@cucumber/cucumber-expressions": "^17.1.0",
|
|
14
14
|
"@cucumber/gherkin": "^28.0.0",
|
|
15
15
|
"@cucumber/tag-expressions": "^6.1.0",
|
|
16
|
-
"@cypress/
|
|
16
|
+
"@cypress/webpack-preprocessor": "^6.0.2",
|
|
17
17
|
"fs-extra": "^11.2.0"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|