@nordicsemiconductor/nrfcloud-location-services-tests

Verifies A-GPS messages sent by nRF Cloud

Usage no npm install needed!

<script type="module">
  import nordicsemiconductorNrfcloudLocationServicesTests from 'https://cdn.skypack.dev/@nordicsemiconductor/nrfcloud-location-services-tests';
</script>

README

nRF Cloud Location Services tests npm version

GitHub Actions semantic-release Renovate Mergify Status Commitizen friendly

Tests the nRF Cloud Location services

Configure these environment variables:

  • API_HOST (optional, endpoint to run the tests against)
  • TEAM_ID
  • AGPS_SERVICE_KEY
  • PGPS_SERVICE_KEY
  • CELLGEO_SERVICE_KEY

Then run:

npm ci
npm run test

Authentication using Evaluation Token

For evaluation purposes, users can generate an evaluation token (see the nRF Cloud Location Services documentation for further information.)

evaluation-token-authentication.spec.ts demonstrates the usage of an evaluation token to authenticate requests.

For this test you need to configure the environment variable EVALUATION_TOKEN, which contains your nRF Cloud Location Service Evaluation Token.

Device Token Authentication

:warning: Using REST with JWT on a cellular device is not recommended because this protocol (REST using TLS with JWT authentication) has a very large overhead. MQTT is recommended for cellular devices.

device-token-authentication.spec.ts demonstrates the usage of per-device tokens to authenticate requests.

The tests register a private key for a virtual device and use that key to sign a JWT.

For this test you need to configure the environment variable API_KEY, which contains your nRF Cloud REST API key.