UNPKG

collins-error

Version:

Custom error class used by the collins system

17 lines (14 loc) 415 B
'use strict'; const Assert = require('assert'); const ErrorTypes = require('../libs/error-types'); describe('ErrorTypes', () => { it('should export an array', () => { Assert.equal(Array.isArray(ErrorTypes), true); }); it('should export all elements as lowercase', () => { let regex = /(?=[A-Z])/; ErrorTypes.forEach((type) => { Assert.equal(type.split(regex).length, 1); }); }); });