Skip to content

Commit

Permalink
Remove unused property from QuestionType
Browse files Browse the repository at this point in the history
  • Loading branch information
christophblessing committed Apr 22, 2024
1 parent c3c337a commit 1645267
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 30 deletions.
7 changes: 0 additions & 7 deletions src/components/Quiz.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ describe('Quiz component', () => {
const testData: Data = [
{
id: 'id-01',
points: 1,
type: QuestionTypes.SingleChoice,
text: 'What is the answer?',
answers: [
Expand All @@ -36,7 +35,6 @@ describe('Quiz component', () => {
},
{
id: 'id-02',
points: 1,
type: QuestionTypes.SingleChoice,
text: 'What is the answer?',
answers: [
Expand Down Expand Up @@ -82,7 +80,6 @@ describe('Conducting a single choice quiz', () => {
const testData: Data = [
{
id: 'id-01',
points: 1,
type: QuestionTypes.SingleChoice,
text: 'What is the answer?',
answers: [
Expand All @@ -100,7 +97,6 @@ describe('Conducting a single choice quiz', () => {
},
{
id: 'id-02',
points: 1,
type: QuestionTypes.SingleChoice,
text: 'What is the answer?',
answers: [
Expand Down Expand Up @@ -152,7 +148,6 @@ describe('Conducting a multiple answer quiz', () => {
const testData: Data = [
{
id: 'id-01',
points: 1,
type: QuestionTypes.MultipleChoice,
text: 'What is the answer?',
answers: [
Expand Down Expand Up @@ -180,7 +175,6 @@ describe('Conducting a multiple answer quiz', () => {
},
{
id: 'id-02',
points: 1,
type: QuestionTypes.MultipleChoice,
text: 'What is the answer?',
answers: [
Expand Down Expand Up @@ -208,7 +202,6 @@ describe('Conducting a multiple answer quiz', () => {
},
{
id: 'id-03',
points: 1,
type: QuestionTypes.MultipleChoice,
text: 'What is the answer?',
answers: [
Expand Down
2 changes: 0 additions & 2 deletions src/components/Result.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ describe('Result component', () => {
id: '',
question: {
id: '',
points: 0,
referenceLink: 'https://testing-library.com',
type: QuestionTypes.SingleChoice,
text: '',
Expand Down Expand Up @@ -56,7 +55,6 @@ describe('Result component', () => {
id: '',
question: {
id: '',
points: 0,
type: QuestionTypes.SingleChoice,
text: '',
answers: [],
Expand Down
19 changes: 0 additions & 19 deletions src/static/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ console.log('Markdown is awesome!');
export const exampleData: Data = [
{
id: '1',
points: 1,
type: QuestionTypes.SingleChoice,
text: 'What is the capital of France?',
referenceLink: 'https://en.wikipedia.org/wiki/Paris',
Expand All @@ -59,7 +58,6 @@ export const exampleData: Data = [
},
{
id: '2',
points: 2,
type: QuestionTypes.SingleChoice,
text: 'Which planet is known as the Red Planet?',
answers: [
Expand All @@ -71,7 +69,6 @@ export const exampleData: Data = [
},
{
id: '3',
points: 1,
type: QuestionTypes.MultipleChoice,
text: 'What is considered a mammal?',
answers: [
Expand All @@ -83,7 +80,6 @@ export const exampleData: Data = [
},
{
id: '4',
points: 2,
type: QuestionTypes.SingleChoice,
text: 'Who wrote "Romeo and Juliet"?',
referenceLink: 'https://en.wikipedia.org/wiki/Romeo_and_Juliet',
Expand All @@ -96,7 +92,6 @@ export const exampleData: Data = [
},
{
id: '5',
points: 1,
type: QuestionTypes.SingleChoice,
text: 'In which year did the Titanic sink?',
referenceLink: 'https://en.wikipedia.org/wiki/Titanic',
Expand All @@ -109,7 +104,6 @@ export const exampleData: Data = [
},
{
id: '6',
points: 2,
type: QuestionTypes.MultipleChoice,
text: 'What are cities in Japan?',
answers: [
Expand All @@ -121,7 +115,6 @@ export const exampleData: Data = [
},
{
id: '7',
points: 1,
type: QuestionTypes.SingleChoice,
text: 'Which gas do plants absorb during photosynthesis?',
answers: [
Expand All @@ -133,7 +126,6 @@ export const exampleData: Data = [
},
{
id: '8',
points: 2,
type: QuestionTypes.SingleChoice,
text: 'Who is known as the "Father of Computer Science"?',
answers: [
Expand All @@ -145,7 +137,6 @@ export const exampleData: Data = [
},
{
id: '9',
points: 1,
type: QuestionTypes.MultipleChoice,
text: 'What are oceans on Earth?',
answers: [
Expand All @@ -157,7 +148,6 @@ export const exampleData: Data = [
},
{
id: '10',
points: 2,
type: QuestionTypes.SingleChoice,
text: 'Who painted the Mona Lisa?',
referenceLink: 'https://en.wikipedia.org/wiki/Mona_Lisa',
Expand All @@ -170,7 +160,6 @@ export const exampleData: Data = [
},
{
id: '11',
points: 2,
type: QuestionTypes.SingleChoice,
text: markdownQuestion,
answers: [
Expand All @@ -187,7 +176,6 @@ export const exampleData: Data = [
export const testData: Data = [
{
id: 'id-01',
points: 1,
type: QuestionTypes.SingleChoice,
text: 'What is the answer?',
referenceLink: 'https://www.example.com',
Expand All @@ -208,7 +196,6 @@ export const testData: Data = [
},
{
id: 'id-02',
points: 1,
type: QuestionTypes.SingleChoice,
text: 'What is the answer?',
courseId: 'courseId-01',
Expand All @@ -228,7 +215,6 @@ export const testData: Data = [
},
{
id: 'id-03',
points: 1,
type: QuestionTypes.MultipleChoice,
text: 'What is the answer?',
answers: [
Expand Down Expand Up @@ -256,7 +242,6 @@ export const testData: Data = [
},
{
id: 'id-04',
points: 1,
type: QuestionTypes.MultipleChoice,
text: 'What is the answer?',
answers: [
Expand Down Expand Up @@ -287,7 +272,6 @@ export const testData: Data = [
export const testDataWithFourQuestions: Data = [
{
id: 'id-01',
points: 1,
type: QuestionTypes.SingleChoice,
text: 'Q1: What is the answer?',
courseId: 'courseId-01',
Expand All @@ -307,7 +291,6 @@ export const testDataWithFourQuestions: Data = [
},
{
id: 'id-02',
points: 1,
type: QuestionTypes.SingleChoice,
text: 'Q2: What is the answer?',
courseId: 'courseId-01',
Expand All @@ -327,7 +310,6 @@ export const testDataWithFourQuestions: Data = [
},
{
id: 'id-03',
points: 1,
type: QuestionTypes.MultipleChoice,
text: 'Q3: What is the answer?',
answers: [
Expand Down Expand Up @@ -355,7 +337,6 @@ export const testDataWithFourQuestions: Data = [
},
{
id: 'id-04',
points: 1,
type: QuestionTypes.MultipleChoice,
text: 'Q4: What is the answer?',
answers: [
Expand Down
3 changes: 1 addition & 2 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,10 @@ export type Data = QuestionType[];

export type QuestionType = {
id: string;
points: number;
referenceLink?: string;
type: QuizType;
text: string;
answers: AnswerType[];
referenceLink?: string;
};

export type QuestionPoolType = QuestionType & {
Expand Down

0 comments on commit 1645267

Please sign in to comment.