fix: add full stop to option ingredient validation error message
This commit is contained in:
parent
1e2e200bd3
commit
8422947b52
@ -145,7 +145,7 @@ class Ingredient {
|
||||
const valStr = (checkVal !== null && checkVal !== undefined) ? String(checkVal).toLowerCase() : "";
|
||||
const matchedOption = permittedOptions.find(opt => opt.toLowerCase() === valStr);
|
||||
if (!matchedOption) {
|
||||
throw new OperationError(`${this.name} must be one of the following: ${permittedOptions.join(", ")}`);
|
||||
throw new OperationError(`${this.name} must be one of the following: ${permittedOptions.join(", ")}.`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -121,7 +121,7 @@ TestRegister.addTests([
|
||||
{
|
||||
name: "Automated Validation: Invalid Option value",
|
||||
input: "test",
|
||||
expectedOutput: "Option Ingredient must be one of the following: Option 1, Option 2, Option 3",
|
||||
expectedOutput: "Option Ingredient must be one of the following: Option 1, Option 2, Option 3.",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "Automated Validation Test Op",
|
||||
@ -132,7 +132,7 @@ TestRegister.addTests([
|
||||
{
|
||||
name: "Automated Validation: Option value as optgroup heading (invalid)",
|
||||
input: "test",
|
||||
expectedOutput: "Option Ingredient must be one of the following: Option 1, Option 2, Option 3",
|
||||
expectedOutput: "Option Ingredient must be one of the following: Option 1, Option 2, Option 3.",
|
||||
recipeConfig: [
|
||||
{
|
||||
op: "Automated Validation Test Op",
|
||||
|
||||
@ -67,7 +67,7 @@ TestRegister.addTests([
|
||||
{
|
||||
name: "Generate Lorem Ipsum: Incorrect lengthType",
|
||||
input: "",
|
||||
expectedOutput: "Length in must be one of the following: Paragraphs, Sentences, Words, Bytes",
|
||||
expectedOutput: "Length in must be one of the following: Paragraphs, Sentences, Words, Bytes.",
|
||||
recipeConfig: [
|
||||
{
|
||||
"op": "Generate Lorem Ipsum",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user