UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:80

29 views
Skip to first unread message

Sidharth Lala

unread,
Apr 13, 2020, 4:04:54 PM4/13/20
to Chai.js
Hi Guys, 

Need some help i am trying to test API and i am getting the below error :

  Profile API
    √ #01 [200 Response Code] fetch no. of places for profile screen


  1 passing (21ms)

(node:16572) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:80
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1129:14)
(node:16572) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)

(node:16572) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

i am using the following imports : Please help as i am stuck.

const config = require('./config.json');
const chai = require('chai');
const chaiHttp = require('chai-http');
const assert = chai.assert;
chai.use(chaiHttp);
Capture.JPG
Reply all
Reply to author
Forward
0 new messages