UNPKG

@eluvio/elv-js-helpers

Version:

A collection of Javascript helper functions used by several Eluvio libraries.

12 lines (9 loc) 376 B
const TH = require('../../../test-helpers') const defBasicModel = TH.requireSrcFile('ModelFactory/defBasicModel') describe('defBasicModel', () => { it('should work as expected', () => { const StringModel = defBasicModel('String', String) TH.expect(()=>StringModel(42)).to.throw('expecting String, got Number 42') StringModel('foo').should.equal('foo') }) })