UNPKG

@hello.nrfcloud.com/proto

Version:

Documents the communication protocol between the hello.nrfcloud.com backend and the web application

21 lines (20 loc) 1.23 kB
import assert from 'node:assert/strict'; import { describe, test as it } from 'node:test'; import { Context } from './Context.js'; void describe('Context', function() { void it('should generate a deviceIdentity context URL', function() { return assert.deepEqual(Context.deviceIdentity, new URL("https://github.com/hello-nrfcloud/proto/deviceIdentity")); }); void it('should generate a problemDetail context URL', function() { return assert.deepEqual(Context.problemDetail, new URL("https://github.com/hello-nrfcloud/proto/ProblemDetail")); }); void it('should generate a error context URL', function() { return assert.deepEqual(Context.error('NotFound'), new URL("https://hello.nrfcloud.com/errors/NotFound")); }); void it('should generate a historical data request context URL', function() { return assert.deepEqual(Context.historicalDataRequest, new URL("https://github.com/hello-nrfcloud/proto/historical-data-request")); }); void it('should generate a historical data response context URL', function() { return assert.deepEqual(Context.historicalDataResponse, new URL("https://github.com/hello-nrfcloud/proto/historical-data-response")); }); });