Skip to content

Commit 84438b9

Browse files
committed
feat: added another test!
1 parent c565a4f commit 84438b9

File tree

3 files changed

+47
-1
lines changed

3 files changed

+47
-1
lines changed

lesson_03/quiz/quiz.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ quiz:
33
anthonymays:
44
- $2y$10$8eHSzy3aCu4Ry3LzO9nWCeGpofSxsNVbnF.wCfn3ZADwQ6MEtN/KK
55
- $2y$10$55EXRjF26JIgebtoH800ZOJecfefvMgHicuxf/rwTENuxiUaFQcNe
6+
anthonymays2:
7+
- $2y$10$8eHSzy3aCu4Ry3LzO9nWCeGpofSxsNVbnF.wCfn3ZADwQ6MEtN/KK
8+
- $2y$10$55EXRjF26JIgebtoH800ZOJecfefvMgHicuxf/rwTENuxiUaFQcNe
69
anotherone:
710
- $2y$10$8eHSzy3aCu4Ry3LzO9nWCeGpofSxsNVbnF.wCfn3ZADwQ6MEtN/KK
811
- $2y$10$dGB0CGv7.XQC5OqfyY6iXOiJsdVyxU3ve5YE0gt4m2I8P8H13lNXa
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import {
2+
AnswerChoice,
3+
MultipleChoiceQuizQuestion,
4+
QuizQuestion,
5+
QuizQuestionProvider,
6+
} from 'codedifferently-instructional';
7+
8+
export class AnthonyMaysQuiz2 implements QuizQuestionProvider {
9+
getProviderName(): string {
10+
return 'anthonymays2';
11+
}
12+
13+
makeQuizQuestions(): QuizQuestion[] {
14+
return [AnthonyMaysQuiz2.makeQuestion0(), AnthonyMaysQuiz2.makeQuestion1()];
15+
}
16+
17+
private static makeQuestion0(): QuizQuestion {
18+
return new MultipleChoiceQuizQuestion(
19+
0,
20+
'What is a multiple choice question?',
21+
new Map<AnswerChoice, string>([
22+
[AnswerChoice.A, 'A question about agency'],
23+
[AnswerChoice.B, 'The hardest kind of quiz question there is'],
24+
[
25+
AnswerChoice.C,
26+
'A question that can be answered using one or more provided choices',
27+
],
28+
[AnswerChoice.D, 'Whatever you want it to be!'],
29+
]),
30+
AnswerChoice.UNANSWERED,
31+
); // Replace `UNANSWERED` with the correct answer.
32+
}
33+
34+
private static makeQuestion1(): QuizQuestion {
35+
return new QuizQuestion(
36+
1,
37+
'What is a computer?',
38+
'A machine that automatically transforms input into output.',
39+
); // Provide an answer.
40+
}
41+
}

lesson_03/quiz/src/quizzes/quizzes.module.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
import { Module } from '@nestjs/common';
22
import { AnotherQuiz } from './another_quiz.js';
3-
import { OyeyemiJimohQuiz } from './oyeyemi_jimoh_quiz.js';
43
import { AnthonyMaysQuiz } from './anthony_mays_quiz.js';
54
import { ChigazoGrahamsQuiz } from './chigazo_graham_quiz.js';
5+
import { AnthonyMaysQuiz2 } from './anthony_mays_quiz_2.js';
66
import { JosephCaballeroQuiz } from './joseph_caballero_quiz.js';
7+
import { OyeyemiJimohQuiz } from './oyeyemi_jimoh_quiz.js';
78
import { YafiahAbdullahQuiz } from './yafiah_abdullah_quiz.js';
89
import { AmiyahJonesQuiz } from './amiyah_jones_quiz.js';
910

@@ -19,6 +20,7 @@ const QUIZ_PROVIDERS = [
1920
OyeyemiJimohQuiz,
2021
ChigazoGrahamsQuiz,
2122
AmiyahJonesQuiz
23+
AnthonyMaysQuiz2,
2224
];
2325

2426
@Module({

0 commit comments

Comments
 (0)