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

133
Views
How do i make my Database return an error for each request for a jest negative test?

I am testing an api with Jest and im trying to trigger an server error in the database, im trying to use nock to do it. the api uses Sequelize as its method of making database requests. is there a way with nock to make all the endpoints of a database server error?

i tried the following but it did not work:

nock(databaseAddress)
        .get(/([\s\S]*)/)
        .reply(500)

do any of you have any suggestions? Thanks

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!