@nordicsemiconductor/nrfcloud-location-services-tests
v7.0.1
Published
Verifies the nRF Cloud Location Services REST API.
Downloads
4,270
Readme
nRF Cloud Location Services tests
Tests the nRF Cloud Location services
Configure these environment variables:
API_HOST
(optional, endpoint to run the tests against)TEAM_ID
LOCATION_SERVICES_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.