style: fix linting issues met Prettier

This commit is contained in:
Lint Action 2025-03-13 14:30:15 +00:00
parent e58835aa17
commit e73d5c21c3
34 changed files with 103 additions and 296 deletions

View file

@ -1,9 +1,6 @@
import { beforeAll, describe, expect, it } from 'vitest';
import { setupTestApp } from '../../setup-tests.js';
import {
getAttachmentRepository,
getLearningObjectRepository,
} from '../../../src/data/repositories.js';
import { getAttachmentRepository, getLearningObjectRepository } from '../../../src/data/repositories.js';
import { AttachmentRepository } from '../../../src/data/content/attachment-repository.js';
import { LearningObjectRepository } from '../../../src/data/content/learning-object-repository.js';
import { LearningObjectIdentifier } from '../../../src/entities/content/learning-object-identifier.js';
@ -21,15 +18,13 @@ describe('AttachmentRepository', () => {
it('should return the requested attachment', async () => {
const id = new LearningObjectIdentifier('id02', Language.English, '1');
const learningObject =
await learningObjectRepository.findByIdentifier(id);
const learningObject = await learningObjectRepository.findByIdentifier(id);
const attachment =
await attachmentRepository.findByMostRecentVersionOfLearningObjectAndName(
learningObject!,
Language.English,
'attachment01'
);
const attachment = await attachmentRepository.findByMostRecentVersionOfLearningObjectAndName(
learningObject!,
Language.English,
'attachment01'
);
expect(attachment).toBeTruthy();
});

View file

@ -17,8 +17,7 @@ describe('LearningObjectRepository', () => {
const id02 = new LearningObjectIdentifier('test_id', Language.English, '1');
it('should return the learning object that matches identifier 1', async () => {
const learningObject =
await learningObjectRepository.findByIdentifier(id01);
const learningObject = await learningObjectRepository.findByIdentifier(id01);
expect(learningObject).toBeTruthy();
expect(learningObject?.title).toBe('Undertow');
@ -26,8 +25,7 @@ describe('LearningObjectRepository', () => {
});
it('should return nothing because the identifier does not exist in the database', async () => {
const learningObject =
await learningObjectRepository.findByIdentifier(id02);
const learningObject = await learningObjectRepository.findByIdentifier(id02);
expect(learningObject).toBeNull();
});

View file

@ -13,21 +13,13 @@ describe('LearningPathRepository', () => {
});
it('should return nothing because no match for hruid and language', async () => {
const learningPath =
await learningPathRepository.findByHruidAndLanguage(
'test_id',
Language.Dutch
);
const learningPath = await learningPathRepository.findByHruidAndLanguage('test_id', Language.Dutch);
expect(learningPath).toBeNull();
});
it('should return requested learning path', async () => {
const learningPath =
await learningPathRepository.findByHruidAndLanguage(
'id01',
Language.English
);
const learningPath = await learningPathRepository.findByHruidAndLanguage('id01', Language.English);
expect(learningPath).toBeTruthy();
expect(learningPath?.title).toBe('repertoire Tool');