Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

264
Views
broma: _interopRequireWildcard no está definido

Estoy usando swc/jest en lugar de ts-jest y babel-jest para ejecutar mis pruebas con jest . Funciona para todas las pruebas, excepto aquellas que deben tratar con archivos que tienen importaciones o exportaciones de comodines (es decir: import * from "./myfile" ).

Al igual que babel , swc/jest transforma la importación de comodín ( * ) en _interopRequireWildcard(require("./myfile")) . (ver pruebas swc ). Pero al hacerlo, jest arroja el siguiente error:

ReferenceError: _interopRequireWildcard no está definido

Aquí está mi configuración de broma:

 const path = require("path"); const resolve = (_path) => path.resolve(__dirname, _path); module.exports = { testURL: "http://localhost", testEnvironment: "jsdom", snapshotSerializers: ["jest-serializer-html"], testPathIgnorePatterns: ["e2e/", ".*donottest.*"], transform: { "^.+\\.(t|j)sx?$": ["@swc/jest"], }, setupFiles: ["jest-canvas-mock"], testRegex: "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$", moduleFileExtensions: ["js", "jsx", "json", "ts", "tsx", "svg"], globals: { "ts-jest": { tsconfig: resolve("./tsconfig.test.json"), diagnostics: false, }, }, };

¿Cómo arreglar esto?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!