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

109
Views
Se debe manejar la función con documentación que me da una promesa de error devuelta por la consulta `findByTestAttr`

Estoy tratando de documentar mi código pero cuando creo una función con el estándar de documento /** */ tengo errores como

 promise returned from `findByTestAttr` query must be handledeslinttesting-library/await-async-query)

No sé cuál es el problema. ¿Alguien podría explicarme por qué sucede eso?

Aquí está el código.

 /** * Returns node(s) with the given data-test attribute. * @param {ShallowWrapper} wrapper - Enzyme shallow wrapper. * @param {string} val - Value of data-test attribute for search. * @returns {ShallowWrapper} */ export const findByTestAttr = (wrapper, val) => { return wrapper.find(`[data-test="${val}"]`); };

Y lo estoy llamando aquí:

 test("renders without errors", () => { const wrapper = mount(<App />); const appComponent = findByTestAttr(wrapper, "component-app"); expect(appComponent).toHaveLength(1); });
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!