Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

401
Vistas
Error de análisis del módulo: token inesperado React JS DOMCollection
Trying to integrate react unit testing in existing rails app. I am getting the below issue after I tried to render a component in test file

comprobar.prueba.tsx:

importar React desde "react"; importar * como ReactDOM desde 'react-dom'; import { render, fireEvent,queryByAttribute ,screen,cleanup,getByText} from "@testing-library/react";

 import CustomDropdown,{APIResponse} from "../CustomDropdown"; function renderCustomDropdown(props: Partial<APIResponse> = {}) { const defaultProps: APIResponse = { validateFormHandler() { return; }, items: [], selectedItems: [], inputText: "", filteredsortByNameIDs: [], placeholderText: "", }; return render(<CustomDropdown {...defaultProps} {...props} />); }:

El problema ocurre después de agregar render ()

 ERROR in ./node_modules/@testing-library/dom/node_modules/pretty-format/build/plugins/DOMCollection.js rails_1 | Module parse failed: Unexpected token rails_1 | You may need an appropriate loader to handle this file type. rails_1 | | return props; rails_1 | | }, {}) rails_1 | | : {...collection}, rails_1 | | config, rails_1 | | indentation, Please help me out to fix this issue.
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda