style: fix linting issues met Prettier
This commit is contained in:
parent
e58835aa17
commit
e73d5c21c3
34 changed files with 103 additions and 296 deletions
|
@ -1,11 +1,7 @@
|
|||
import { beforeAll, describe, expect, it } from 'vitest';
|
||||
import { setupTestApp } from '../../setup-tests';
|
||||
import { QuestionRepository } from '../../../src/data/questions/question-repository';
|
||||
import {
|
||||
getLearningObjectRepository,
|
||||
getQuestionRepository,
|
||||
getStudentRepository,
|
||||
} from '../../../src/data/repositories';
|
||||
import { getLearningObjectRepository, getQuestionRepository, getStudentRepository } from '../../../src/data/repositories';
|
||||
import { StudentRepository } from '../../../src/data/users/student-repository';
|
||||
import { LearningObjectRepository } from '../../../src/data/content/learning-object-repository';
|
||||
import { LearningObjectIdentifier } from '../../../src/entities/content/learning-object-identifier';
|
||||
|
@ -25,8 +21,7 @@ describe('QuestionRepository', () => {
|
|||
|
||||
it('should return all questions part of the given learning object', async () => {
|
||||
const id = new LearningObjectIdentifier('id05', Language.English, '1');
|
||||
const questions =
|
||||
await questionRepository.findAllQuestionsAboutLearningObject(id);
|
||||
const questions = await questionRepository.findAllQuestionsAboutLearningObject(id);
|
||||
|
||||
expect(questions).toBeTruthy();
|
||||
expect(questions).toHaveLength(2);
|
||||
|
@ -40,8 +35,7 @@ describe('QuestionRepository', () => {
|
|||
author: student!,
|
||||
content: 'question?',
|
||||
});
|
||||
const question =
|
||||
await questionRepository.findAllQuestionsAboutLearningObject(id);
|
||||
const question = await questionRepository.findAllQuestionsAboutLearningObject(id);
|
||||
|
||||
expect(question).toBeTruthy();
|
||||
expect(question).toHaveLength(1);
|
||||
|
@ -49,13 +43,9 @@ describe('QuestionRepository', () => {
|
|||
|
||||
it('should not find removed question', async () => {
|
||||
const id = new LearningObjectIdentifier('id04', Language.English, '1');
|
||||
await questionRepository.removeQuestionByLearningObjectAndSequenceNumber(
|
||||
id,
|
||||
1
|
||||
);
|
||||
await questionRepository.removeQuestionByLearningObjectAndSequenceNumber(id, 1);
|
||||
|
||||
const question =
|
||||
await questionRepository.findAllQuestionsAboutLearningObject(id);
|
||||
const question = await questionRepository.findAllQuestionsAboutLearningObject(id);
|
||||
|
||||
expect(question).toHaveLength(0);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue