From 53296ffa593eca89da122f5c23acecf615b2c3ff Mon Sep 17 00:00:00 2001 From: "David A. Wheeler" Date: Wed, 5 Feb 2025 01:00:07 -0500 Subject: [PATCH] Add hint tests to lab template Signed-off-by: David A. Wheeler --- docs/labs/template.js | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/docs/labs/template.js b/docs/labs/template.js index dfcd56c5..ba4732c7 100644 --- a/docs/labs/template.js +++ b/docs/labs/template.js @@ -3,25 +3,41 @@ info = hints: [ { present: "initial", - text: "The term 'initial' is not part of the answer." + text: "The term 'initial' is not part of the answer.", + examples: [ + [ 'initial', ], + ], }, { present: "unknown", - text: "Unknown is not part of the answer." + text: "Unknown is not part of the answer.", + examples: [ + [ 'unknown', ], + ], }, { absent: String.raw`EXPECTED`, - text: "The word 'EXPECTED' is expected." + text: "The word 'EXPECTED' is expected.", + examples: [ + [ '', ], + [ 'fiddly', ], + ], }, { present: "initial", index: 1, - text: "The term 'initial' is not part of the answer." + text: "The term 'initial' is not part of the answer.", + examples: [ + [ null, 'initial', ], + ], }, { absent: String.raw`EXPECTED`, index: 1, - text: "The word 'EXPECTED' is expected." + text: "The word 'EXPECTED' is expected.", + examples: [ + [ null, 'not-here', ], + ], }, ], expected: [