Esri / arcgis-rest-js

compact, modular JavaScript wrappers for the ArcGIS REST API
https://developers.arcgis.com/arcgis-rest-js/
Apache License 2.0
353 stars 121 forks source link

Tests not mocking requests to GPServer #1098

Open tomwayson opened 1 year ago

tomwayson commented 1 year ago

Describe the bug

dozens of Unmatched POST to https://sampleserver6.arcgisonline.com/arcgis/rest/services/911CallsHotspot/GPServer/911%20Calls%20Hotspot/jobs/j4fa1db2338f042a19eb68856afabc27e printed to terminal when running tests.

Reproduction

  1. npm test

observe ^^^

expected tests mock all requests

Logs

...
Unmatched POST to https://sampleserver6.arcgisonline.com/arcgis/rest/services/911CallsHotspot/GPServer/911%20Calls%20Hotspot/jobs/j4fa1db2338f042a19eb68856afabc27e
Unmatched POST to https://sampleserver6.arcgisonline.com/arcgis/rest/services/911CallsHotspot/GPServer/911%20Calls%20Hotspot/jobs/j4fa1db2338f042a19eb68856afabc27e
...............................................................................................................................................................

612 specs, 0 failures
Finished in 17.678 seconds

### System Info

```shell
branch `main`

  System:
    OS: macOS 13.2.1
    CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
    Memory: 865.73 MB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 18.14.0 - ~/.volta/tools/image/node/18.14.0/bin/node
    Yarn: 1.22.15 - ~/.volta/tools/image/yarn/1.22.15/bin/yarn
    npm: 7.24.2 - ~/code/arcgis-rest-js/node_modules/.bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Browsers:
    Chrome: 112.0.5615.49
    Edge: 111.0.1661.62
    Firefox: 104.0.2
    Safari: 16.3

Additional Information

No response

gavinr commented 1 year ago

IIRC this may have started when we added job support (#1020).