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

103
Views
function with documentation that gives me error promise returned from `findByTestAttr` query must be handled

I'm trying to document my code but when I create a function with document standard /** */ I'm having errors like

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

I don't know what is the problem. Could anyone explain to me why that happens?

Here is the code.

/**
* 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}"]`);
};

And I'm calling it here:

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!