From 7b464c0434dcc182fee8158debc416c5abba1029 Mon Sep 17 00:00:00 2001 From: Leung Cheng Date: Fri, 10 Nov 2023 19:48:03 +0800 Subject: [PATCH] temp test draft --- src/app/components/mc/editor.test.tsx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/app/components/mc/editor.test.tsx b/src/app/components/mc/editor.test.tsx index b9c7f48..dfaa46d 100644 --- a/src/app/components/mc/editor.test.tsx +++ b/src/app/components/mc/editor.test.tsx @@ -1,6 +1,7 @@ import { fireEvent, render } from '@testing-library/react' import { QuestionSetRepoFactory } from '../../../repo/question_set' import { QuestionSetEditorUIService } from './editor' +import { MultipleChoice } from '../../../model/mc' describe('QuestionSetEditor', () => { it('should save question set', () => { @@ -39,5 +40,20 @@ describe('QuestionSetEditor', () => { expect(actualQuestionSet.name).toBe('Test name') expect(actualQuestionSet.questions.length).toBe(1) expect(actualQuestionSet.questions[0].title).toBe('Am I handsome?') + // expect(actualQuestionSet.questions[0].mc).toBe( + // new MultipleChoice({ + // choices: [ + // { + // answer: 'True', + // isFixedPosition: true, + // }, + // { + // answer: 'False', + // isFixedPosition: false, + // }, + // ], + // correctChoiceIndex: 0, + // }), + // ) }) })