Skip to content

Commit c682086

Browse files
authored
fix misspelling of the word optional in the error message (#397)
1 parent bdd8a4e commit c682086

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/convict/src/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ const convict = function convict(def, opts) {
614614
options.allowed = options.allowed || ALLOWED_OPTION_WARN
615615

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

620620
const output_function = options.output || global.console.log

packages/convict/test/validation.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ describe('configuration files contain properties not declared in the schema', fu
131131
config.validate({
132132
output: 312
133133
})
134-
}).toThrow(/options\.output is optionnal and must be a function\./)
134+
}).toThrow(/options\.output is optional and must be a function\./)
135135
})
136136

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

0 commit comments

Comments
 (0)