• Jobs
  • About Us
  • professionals
    • Home
    • Jobs
    • Courses and challenges
  • business
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

635
Views
Los archivos de características requieren algún archivo de carga para ejecutarse

Estoy tratando de ejecutar el archivo de características usando pepino en Cypress 10.2.0.

Me está arrojando un problema de "Error de compilación de WebPack"

 Error: Webpack Compilation Error ./cypress/e2e/BankManagerLogin.feature 1:14 Module parse failed: Unexpected token (1:14) You may need an appropriate loader to handle this file type, currently, no loaders are configured to process this file. See https://webpack.js.org/concepts#loaders

Cualquier ayuda sería apreciada

about 3 years ago · Juan Pablo Isaza
1 answers
Answer question

0

El archivo cypress.config necesita ajustarse para borrar ese error.

Prueba esto, es un código bolier-plate del repositorio de badeball.

Esto supone que tiene Typescript (avíseme si solo está usando Javascript).

 import { defineConfig } from "cypress"; import * as webpack from "@cypress/webpack-preprocessor"; import { addCucumberPreprocessorPlugin } from "@badeball/cypress-cucumber-preprocessor"; async function setupNodeEvents( on: Cypress.PluginEvents, config: Cypress.PluginConfigOptions ): Promise<Cypress.PluginConfigOptions> { await addCucumberPreprocessorPlugin(on, config); on( "file:preprocessor", webpack({ webpackOptions: { resolve: { extensions: [".ts", ".js"], }, module: { rules: [ { test: /\.ts$/, exclude: [/node_modules/], use: [ { loader: "ts-loader", }, ], }, { test: /\.feature$/, use: [ { loader: "@badeball/cypress-cucumber-preprocessor/webpack", options: config, }, ], }, ], }, }, }) ); // Make sure to return the config object as it might have been modified by the plugin. return config; } export default defineConfig({ e2e: { specPattern: "**/*.feature", supportFile: false, setupNodeEvents, }, });
about 3 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Our process Sales
Legal
Terms and conditions Privacy policy
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recommend me some offers
I have an error