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

399
Views
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
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!