UNPKG

@hello.nrfcloud.com/proto

Version:

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

18 lines (17 loc) 726 B
import assert from 'node:assert'; import { describe, test as it } from 'node:test'; import { validateWithTypeBox } from '../validator/validateWithTypeBox.js'; import { ApiHealth } from './ApiHealth.js'; import { Context } from './Context.js'; void describe('ApiHealth', function() { void describe('validate device configuration requests', function() { void it('should validate', function() { var message = { '@context': Context.apiHealth.toString(), version: '0.0.0-development' }; var maybeValid = validateWithTypeBox(ApiHealth)(message); assert.deepEqual('value' in maybeValid && maybeValid.value, message); }); }); });