developmentseed / developmentseed/scoreboard
unit tests should not hit OSM / Maproulette APIs
- Dominant language
- JavaScript
- Stars
- 27
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
I noticed this when running `yarn test` locally. I believe best practice is that 3rd party and external apis should be mocked. CI running unit tests can fail because of network problems (making it a flaky test), but it also it adds load to what is basically a free service which OSM is sponsoring.
```
error: Error: connect ETIMEDOUT 198.199.72.41:443
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1134:16) {
errno: 'ETIMEDOUT',
code: 'ETIMEDOUT',
syscall: 'connect',
address: '198.199.72.41',
port: 443
},
options: {
uri: 'http://maproulette.org/api/v2/data/challenge/338',
headers: { 'Accept-Language': 'en-US,en;q=0.9' },
callback: [Function: RP$callback],
transform: undefined,
simple: true,
resolveWithFullResponse: false,
transform2xxOnly: false
},
```
Contributor guide
Assessment
This issue has not been assessed yet.