Skip to content

Commit

Permalink
fix: ci issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Marsup committed Oct 4, 2023
1 parent cac6961 commit 2f8281f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion test/errors.js
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down

0 comments on commit 2f8281f

Please sign in to comment.