infinitered / apisauce

Axios + standardized errors + request/response transforms.
MIT License
2.78k stars 184 forks source link

got 2 test case failed in unit test #315

Open JohnieXu opened 1 year ago

JohnieXu commented 1 year ago
  1. pull the latest master branch, commit_id is 9d20d580e648c63c3a2e83a3285aed0d609b0a3f
  2. run npm run prepare
  3. run npm run dist
  4. then there are two test cases that failed, the details are as follows.
  68 passed
  2 failed

  set-base-url › changes the headers

  /Users/johniexu/Documents/github/apisauce/test/set-base-url.test.js:39

   38:   const response3 = await api.get('/number/200')
   39:   t.is(response3.problem, 'CONNECTION_ERROR')   
   40: })                                              

  Difference:

  - 'SERVER_ERROR'
  + 'CONNECTION_ERROR'
no-server › has a response despite no server

  /Users/johniexu/Documents/github/apisauce/test/no-server.test.js:13

   12:   return x.get('/number/200', { a: 'b' }).then(response => {
   13:     t.is(response.status, null)                             
   14:     t.is(response.problem, CONNECTION_ERROR)                

  Difference:

  - 502
  + null

my device infos are as follows:

  1. Node.js: v16.13.1
  2. OS: macOS 10.15.7
jamonholmgren commented 1 year ago

This will be fixed with #314.