Skip to content

Commit

Permalink
feat: added another test!
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonydmays committed Oct 1, 2024
1 parent c565a4f commit 84438b9
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 1 deletion.
3 changes: 3 additions & 0 deletions lesson_03/quiz/quiz.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ quiz:
anthonymays:
- $2y$10$8eHSzy3aCu4Ry3LzO9nWCeGpofSxsNVbnF.wCfn3ZADwQ6MEtN/KK
- $2y$10$55EXRjF26JIgebtoH800ZOJecfefvMgHicuxf/rwTENuxiUaFQcNe
anthonymays2:
- $2y$10$8eHSzy3aCu4Ry3LzO9nWCeGpofSxsNVbnF.wCfn3ZADwQ6MEtN/KK
- $2y$10$55EXRjF26JIgebtoH800ZOJecfefvMgHicuxf/rwTENuxiUaFQcNe
anotherone:
- $2y$10$8eHSzy3aCu4Ry3LzO9nWCeGpofSxsNVbnF.wCfn3ZADwQ6MEtN/KK
- $2y$10$dGB0CGv7.XQC5OqfyY6iXOiJsdVyxU3ve5YE0gt4m2I8P8H13lNXa
Expand Down
41 changes: 41 additions & 0 deletions lesson_03/quiz/src/quizzes/anthony_mays_quiz_2.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import {
AnswerChoice,
MultipleChoiceQuizQuestion,
QuizQuestion,
QuizQuestionProvider,
} from 'codedifferently-instructional';

export class AnthonyMaysQuiz2 implements QuizQuestionProvider {
getProviderName(): string {
return 'anthonymays2';
}

makeQuizQuestions(): QuizQuestion[] {
return [AnthonyMaysQuiz2.makeQuestion0(), AnthonyMaysQuiz2.makeQuestion1()];
}

private static makeQuestion0(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
0,
'What is a multiple choice question?',
new Map<AnswerChoice, string>([
[AnswerChoice.A, 'A question about agency'],
[AnswerChoice.B, 'The hardest kind of quiz question there is'],
[
AnswerChoice.C,
'A question that can be answered using one or more provided choices',
],
[AnswerChoice.D, 'Whatever you want it to be!'],
]),
AnswerChoice.UNANSWERED,
); // Replace `UNANSWERED` with the correct answer.
}

private static makeQuestion1(): QuizQuestion {
return new QuizQuestion(
1,
'What is a computer?',
'A machine that automatically transforms input into output.',
); // Provide an answer.
}
}
4 changes: 3 additions & 1 deletion lesson_03/quiz/src/quizzes/quizzes.module.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import { Module } from '@nestjs/common';
import { AnotherQuiz } from './another_quiz.js';
import { OyeyemiJimohQuiz } from './oyeyemi_jimoh_quiz.js';
import { AnthonyMaysQuiz } from './anthony_mays_quiz.js';
import { ChigazoGrahamsQuiz } from './chigazo_graham_quiz.js';
import { AnthonyMaysQuiz2 } from './anthony_mays_quiz_2.js';
import { JosephCaballeroQuiz } from './joseph_caballero_quiz.js';
import { OyeyemiJimohQuiz } from './oyeyemi_jimoh_quiz.js';
import { YafiahAbdullahQuiz } from './yafiah_abdullah_quiz.js';
import { AmiyahJonesQuiz } from './amiyah_jones_quiz.js';

Expand All @@ -19,6 +20,7 @@ const QUIZ_PROVIDERS = [
OyeyemiJimohQuiz,
ChigazoGrahamsQuiz,
AmiyahJonesQuiz
AnthonyMaysQuiz2,
];

@Module({
Expand Down

0 comments on commit 84438b9

Please sign in to comment.