diff --git a/lib/template.js b/lib/template.js index 70d4cbea..14bd3abb 100755 --- a/lib/template.js +++ b/lib/template.js @@ -41,8 +41,8 @@ module.exports = exports = internals.Template = class { this._settings = Object.keys(opts).length ? clone(opts) : undefined; this._functions = functions; if (this._functions) { - Assert(Object.keys(this._functions).every((key) => typeof key === 'string'), 'Functions keys must be strings'); - Assert(Object.values(this._functions).every((key) => typeof key === 'function'), 'Functions values must be functions'); + assert(Object.keys(this._functions).every((key) => typeof key === 'string'), 'Functions keys must be strings'); + assert(Object.values(this._functions).every((key) => typeof key === 'function'), 'Functions values must be functions'); } } else { diff --git a/test/errors.js b/test/errors.js index 4acad25b..b5ac3a40 100755 --- a/test/errors.js +++ b/test/errors.js @@ -38,7 +38,7 @@ describe('errors', () => { const err = Joi.valid('foo').validate('bar', { errors: { stack: true } }).error; expect(err).to.be.an.error(); expect(err.isJoi).to.be.true(); - expect(err.stack).to.contain('at Object.exports.process'); + expect(err.stack).to.contain('at exports.process'); }); it('supports custom errors when validating types', () => {