6-mils
Version:
A JS library for sending, receiving, and parsing cXML messages.
24 lines (20 loc) • 544 B
JavaScript
/* eslint-env mocha */
/**
* Code under test.
* @type {any}
*/
const T = require('./index.js')
describe('the "CxmlVersion" module', function () {
it('must export a string value', function () {
const expected = 'string'
const actual = typeof T
expect(actual).to.equal(expected)
})
describe('the exported string', function () {
it('must be a valid cXML version identifier', function () {
const expected = /^[1-9]([0-9]+)?\.\d+\.\d+$/
const actual = T
expect(actual).to.match(expected)
})
})
})