• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

IGNF / geoportal-wfs-client / #54

24 Nov 2023 11:21AM UTC coverage: 88.065% (+1.0%) from 87.097%
#54

push

Alexis Horde
Remplacement de nyc par c8 pour le coverage (fonctionne avec type:modules ES6)

41 of 47 branches covered (0.0%)

273 of 310 relevant lines covered (88.06%)

7.3 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

82.61
/src/internal/httpClient.js
1
import axios from 'axios';
1✔
2
import  { HttpProxyAgent }  from 'http-proxy-agent';
1✔
3
import  { HttpsProxyAgent } from 'https-proxy-agent';
1✔
4

1✔
5
const axiosGlobalConfig = {};
1✔
6

1✔
7
/*
1✔
8
 * NodeJS specific code to allow https throw http proxy with axios
1✔
9
 * (fixes https://github.com/IGNF/geoportal-wfs-client/issues/5)
1✔
10
 */
1✔
11
if ('undefined' === typeof window ){
1✔
12
    if ( process.env.HTTP_PROXY ){
1!
13
        axiosGlobalConfig.httpAgent = new HttpProxyAgent(process.env.HTTP_PROXY);
×
14
    }
×
15
    if ( process.env.HTTPS_PROXY ){
1!
16
        axiosGlobalConfig.httpsAgent = new HttpsProxyAgent(process.env.HTTPS_PROXY);
×
17
    }
×
18
    axiosGlobalConfig.proxy = false;
1✔
19
}
1✔
20

1✔
21
const httpClient = axios.create(axiosGlobalConfig);
1✔
22

1✔
23
export default httpClient;
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc