UNPKG

@hello.nrfcloud.com/proto

Version:

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

13 lines (12 loc) 536 B
import assert from 'node:assert/strict'; import { describe, it } from 'node:test'; import { validateWithTypeBox } from 'validator/validateWithTypeBox.js'; import { Timestamp } from './Timestamp.js'; void describe('Timestamp', function() { void it('should validate', function() { var input = '2024-04-19T08:30:00.000Z'; var maybeValid = validateWithTypeBox(Timestamp)(input); assert.equal('errors' in maybeValid, false); assert.deepEqual('value' in maybeValid && maybeValid.value, input); }); });