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

410
Views
Los accesorios del método están destinados a ejecutarse en 1 nodo, 0 encontrado en su lugar (Jest, ReactJS)

Atascado, cuál es la mejor manera de hacer una prueba unitaria en un gancho que verifique si hay un carácter coincidente entre el texto de entrada y el texto de la API. Solo la letra NO coincidente estará en negrita y la letra coincidente permanecerá normal. ¿Cómo pruebo elementos que solo se muestran al escribir más de 2 caracteres? Esto es básicamente un menú desplegable.

 return ( <SearchResultComponent> {(loadingData && currentInputLength) ? <SearchResultBlockShow> {getResult.map((item: SearchTerm, index: number) => ( <SearchResultBlock key={index} > <MakeBold currentResult={item.searchterm} keyword={currentInput} /> <SearchResultSpan>{"(" + item.nrResults + ")"}</SearchResultSpan> </SearchResultBlock> ))} </SearchResultBlockShow> : <SearchNoResult>No Result</SearchNoResult>} </SearchResultComponent> )

][1] ] 2

 import { mount, shallow } from "enzyme"; import { Provider } from "react-redux"; import { screen } from "@testing-library/dom"; import { render } from "@testing-library/react"; import '@testing-library/jest-dom'; import { store } from "../Store"; import { MakeBold } from "./matchCharacter"; it("SearchResult Component test props", () => { const wrap = shallow( <Provider store={store}> <MakeBold currentResult={"trui"} keyword={"trui"} /> </Provider> ); expect( wrap.find({ "data-testid": "match-character-test" }). filter((x: any) => x.props('dangerouslySetInnerHTML')). prop('dangerouslySetInnerHTML'). __html ).toBe('<span>trui<span>'); });

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!