You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I unable to run cucumber.js file after migrating to the cucumber 10.8 version.It is showing below error.
Error: Failed to import formatter ./src/helper/report/allureReport.ts
at importCode (/Users/test/Documents/Workspace/purpleportalautomation/node_modules/@cucumber/cucumber/src/formatter/import_code.ts:14:11)
at async resolveImplementation (/Users/test/Documents/Workspace/purpleportalautomation/node_modules/@cucumber/cucumber/src/formatter/resolve_implementation.ts:13:22)
at async initializeFormatter (/Users/test/Documents/Workspace/purpleportalautomation/node_modules/@cucumber/cucumber/src/api/formatters.ts:51:28)
at async initializeFormatters (/Users/test/Documents/Workspace/purpleportalautomation/node_modules/@cucumber/cucumber/src/api/formatters.ts:86:5)
at async runCucumber (/Users/test/Documents/Workspace/purpleportalautomation/node_modules/@cucumber/cucumber/src/api/run_cucumber.ts:93:29)
at async Cli.run (/Users/test/Documents/Workspace/purpleportalautomation/node_modules/@cucumber/cucumber/src/cli/index.ts:79:25)
at async Object.run [as default] (/Users/test/Documents/Workspace/purpleportalautomation/node_modules/@cucumber/cucumber/src/cli/run.ts:32:14) {
[cause]: TypeError: Unknown file extension ".ts" for /Users/test/Documents/Workspace/purpleportalautomation/src/helper/report/allureReport.ts
Note:
It is not allowing to import below
import { CucumberAllureWorld } from 'allure-cucumberjs'
To Reproduce
Steps to reproduce the behavior:
Migrate cucumber version to latest 10.8
Run the following command npx cucumber-js test --tags '@smoke'
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Describe the bug
I unable to run cucumber.js file after migrating to the cucumber 10.8 version.It is showing below error.
Error: Failed to import formatter ./src/helper/report/allureReport.ts
at importCode (/Users/test/Documents/Workspace/purpleportalautomation/node_modules/@cucumber/cucumber/src/formatter/import_code.ts:14:11)
at async resolveImplementation (/Users/test/Documents/Workspace/purpleportalautomation/node_modules/@cucumber/cucumber/src/formatter/resolve_implementation.ts:13:22)
at async initializeFormatter (/Users/test/Documents/Workspace/purpleportalautomation/node_modules/@cucumber/cucumber/src/api/formatters.ts:51:28)
at async initializeFormatters (/Users/test/Documents/Workspace/purpleportalautomation/node_modules/@cucumber/cucumber/src/api/formatters.ts:86:5)
at async runCucumber (/Users/test/Documents/Workspace/purpleportalautomation/node_modules/@cucumber/cucumber/src/api/run_cucumber.ts:93:29)
at async Cli.run (/Users/test/Documents/Workspace/purpleportalautomation/node_modules/@cucumber/cucumber/src/cli/index.ts:79:25)
at async Object.run [as default] (/Users/test/Documents/Workspace/purpleportalautomation/node_modules/@cucumber/cucumber/src/cli/run.ts:32:14) {
[cause]: TypeError: Unknown file extension ".ts" for /Users/test/Documents/Workspace/purpleportalautomation/src/helper/report/allureReport.ts
Note:
It is not allowing to import below
import { CucumberAllureWorld } from 'allure-cucumberjs'
To Reproduce
Steps to reproduce the behavior:
Migrate cucumber version to latest 10.8
Run the following command npx cucumber-js test --tags '@smoke'
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
//allureReport.ts
/* eslint-disable @typescript-eslint/no-explicit-any */
import { AllureRuntime, CucumberJSAllureFormatter } from 'allure-cucumberjs'
function Reporter(options: any) {
return new CucumberJSAllureFormatter(
options,
new AllureRuntime({ resultsDir: 'reports/allure-results' }),
{
labels: [
{
name: 'epic',
pattern: [/@feature:(.)/],
},
{
name: 'severity',
pattern: [/@Severity:(.)/],
},
],
links: [
{
type: 'issue',
pattern: [/@issue=(.)/],
urlTemplate: 'http://localhost:8080/issue/%s',
},
{
type: 'tms',
pattern: [/@tms=(.)/],
urlTemplate: 'http://localhost:8080/tms/%s',
},
],
}
)
}
Reporter.prototype = Object.create(CucumberJSAllureFormatter.prototype)
Reporter.prototype.constructor = Reporter
exports.default = Reporter
cucumber.json
package.json
The text was updated successfully, but these errors were encountered: