Skip to content

Commit

Permalink
fix misspelling of the word optional in the error message (#397)
Browse files Browse the repository at this point in the history
  • Loading branch information
mojavelinux authored Oct 18, 2021
1 parent bdd8a4e commit c682086
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/convict/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ const convict = function convict(def, opts) {
options.allowed = options.allowed || ALLOWED_OPTION_WARN

if (options.output && typeof options.output !== 'function') {
throw new Error('options.output is optionnal and must be a function.')
throw new Error('options.output is optional and must be a function.')
}

const output_function = options.output || global.console.log
Expand Down
2 changes: 1 addition & 1 deletion packages/convict/test/validation.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ describe('configuration files contain properties not declared in the schema', fu
config.validate({
output: 312
})
}).toThrow(/options\.output is optionnal and must be a function\./)
}).toThrow(/options\.output is optional and must be a function\./)
})

test('must not break on consecutive overrides', function() {
Expand Down

0 comments on commit c682086

Please sign in to comment.