Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix misspelling of the word optional in the error message #397

Merged
merged 1 commit into from
Oct 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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