vlucas / frisby

Frisby is a REST API testing framework built on Jest that makes testing API endpoints easy, fast, and fun.
http://frisbyjs.com
1.53k stars 201 forks source link

How i can solve issue of Async #545

Closed amrsa1 closed 4 years ago

amrsa1 commented 4 years ago

im getting this error below but happened randomly some times it happens sometime is not

it('1- API will return 200 and shows company service after successful login ', (callback)=> { return frisby .get('https://cdddisddsisdsusers/current') .inspectJSON() .expect('status', 200) .done(callback) });

● Backend Validation › 1- API will return 200 and shows company service after successful login

: Timeout - Async callback was not invoked within the 5000ms timeout specified by jest.setTimeout.Timeout - Async callback was not invoked within the 5000ms timeout specified by jest.setTimeout.Error:

  65 | 
  66 | 
> 67 |     it('1- API will return 200 and shows company service after successful login ', (callback)=> {
     |     ^
  68 |       return frisby
  69 |             .get('https://testt/users/current')
  70 |                     .inspectJSON()

  at new Spec (node_modules/jest-jasmine2/build/jasmine/Spec.js:116:22)
  at Suite.<anonymous> (testingEnv/mcTesting.js:67:5)
  at Object.<anonymous> (testingEnv/mcTesting.js:11:1)
amrsa1 commented 4 years ago

@vlucas @H1Gdev

H1Gdev commented 4 years ago

@Amrkamel1

See below for timeouts.