From 4025aba7a313da983e4fb18466e1145deb5e983e Mon Sep 17 00:00:00 2001 From: "Krzysztof G." <60067306+gikf@users.noreply.github.com> Date: Mon, 23 Dec 2024 08:38:31 +0100 Subject: [PATCH] fix(curriculum): ensure empty array doesn't pass tests in Quiz Game (#57698) --- .../lab-quiz-game/66f17db06803d11a1bd19a20.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/curriculum/challenges/english/25-front-end-development/lab-quiz-game/66f17db06803d11a1bd19a20.md b/curriculum/challenges/english/25-front-end-development/lab-quiz-game/66f17db06803d11a1bd19a20.md index 3e4695fe7dc..402c9e8d73e 100644 --- a/curriculum/challenges/english/25-front-end-development/lab-quiz-game/66f17db06803d11a1bd19a20.md +++ b/curriculum/challenges/english/25-front-end-development/lab-quiz-game/66f17db06803d11a1bd19a20.md @@ -43,12 +43,14 @@ questions.forEach(question => { The `category` key should have the value of a string representing a question category. ```js +assert.isNotEmpty(questions); questions.forEach(({category}) => assert.isString(category)); ``` The `question` key should have the value of a string representing a question. ```js +assert.isNotEmpty(questions); questions.forEach(({question}) => { assert.isString(question); assert.include(question, '?'); @@ -58,6 +60,7 @@ questions.forEach(({question}) => { The `choices` key should have the value of an array containing three strings. ```js +assert.isNotEmpty(questions); questions.forEach(({choices}) => { assert.isArray(choices); assert.lengthOf(choices, 3); @@ -68,12 +71,14 @@ questions.forEach(({choices}) => { The `answer` key should have the value of a string. ```js +assert.isNotEmpty(questions); questions.forEach(({answer}) => assert.isString(answer)); ``` The value of `answer` should be included in the `choices` array. ```js +assert.isNotEmpty(questions); questions.forEach(({answer, choices}) => assert.oneOf(answer, choices)); ```