UNPKG

@eluvio/elv-js-helpers

Version:

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

14 lines (12 loc) 514 B
// AUTO-GENERATED TEST - DO NOT MODIFY, CHANGES WILL BE OVERWRITTEN DURING BUILD 'use strict' const TH = require('../../../test-helpers') const defBasicModel = TH.requireSrcFile('ModelFactory/defBasicModel') describe('defBasicModel JSDoc example', () => { it('should execute correctly as described', () => { 'use strict' const StringModel = defBasicModel('String', String) TH.expect(() => StringModel(42)).to.throw('expecting String, got Number 42') StringModel('foo').should.eql('foo') }) })