fix(backend): format code

Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
Tilman Vatteroth 2023-08-15 21:29:40 +02:00 committed by renovate[bot]
parent 1d31a1b11f
commit 0111f2b65e
4 changed files with 16 additions and 24 deletions

View file

@ -122,9 +122,8 @@ describe('History', () => {
let postEntryDto: HistoryEntryImportDto;
let prevEntry: HistoryEntry;
beforeAll(async () => {
const previousHistory = await testSetup.historyService.getEntriesByUser(
user,
);
const previousHistory =
await testSetup.historyService.getEntriesByUser(user);
expect(previousHistory).toHaveLength(1);
prevEntry = previousHistory[0];
pinStatus = !previousHistory[0].pinStatus;
@ -159,9 +158,8 @@ describe('History', () => {
.expect(404);
});
afterEach(async () => {
const historyEntries = await testSetup.historyService.getEntriesByUser(
user,
);
const historyEntries =
await testSetup.historyService.getEntriesByUser(user);
expect(historyEntries).toHaveLength(1);
expect(await (await historyEntries[0].note).aliases).toEqual(
await (

View file

@ -127,9 +127,8 @@ describe('Me', () => {
await expect(
testSetup.userService.getUserByUsername('hardcoded'),
).rejects.toThrow(NotInDBError);
const mediaUploadsAfter = await testSetup.mediaService.listUploadsByNote(
note1,
);
const mediaUploadsAfter =
await testSetup.mediaService.listUploadsByNote(note1);
expect(mediaUploadsAfter).toHaveLength(0);
});
});

View file

@ -485,9 +485,8 @@ describe('Notes', () => {
});
it("doesn't do anything if the user is the owner", async () => {
const note = await testSetup.notesService.getNoteByIdOrAlias(
user1NoteAlias,
);
const note =
await testSetup.notesService.getNoteByIdOrAlias(user1NoteAlias);
await testSetup.permissionsService.removeUserPermission(note, user2);
const response = await agent
@ -533,9 +532,8 @@ describe('Notes', () => {
});
it('works', async () => {
const note = await testSetup.notesService.getNoteByIdOrAlias(
user1NoteAlias,
);
const note =
await testSetup.notesService.getNoteByIdOrAlias(user1NoteAlias);
await testSetup.permissionsService.setUserPermission(
note,
user2,
@ -607,9 +605,8 @@ describe('Notes', () => {
});
it('works', async () => {
const note = await testSetup.notesService.getNoteByIdOrAlias(
user1NoteAlias,
);
const note =
await testSetup.notesService.getNoteByIdOrAlias(user1NoteAlias);
await testSetup.permissionsService.setGroupPermission(
note,
group1,

View file

@ -56,9 +56,8 @@ describe('Me', () => {
.expect(200);
const history: HistoryEntryDto[] = response.body;
expect(history.length).toEqual(1);
const historyDto = await testSetup.historyService.toHistoryEntryDto(
createdHistoryEntry,
);
const historyDto =
await testSetup.historyService.toHistoryEntryDto(createdHistoryEntry);
for (const historyEntry of history) {
expect(historyEntry.identifier).toEqual(historyDto.identifier);
expect(historyEntry.title).toEqual(historyDto.title);
@ -81,9 +80,8 @@ describe('Me', () => {
.expect('Content-Type', /json/)
.expect(200);
const historyEntry: HistoryEntryDto = response.body;
const historyEntryDto = await testSetup.historyService.toHistoryEntryDto(
createdHistoryEntry,
);
const historyEntryDto =
await testSetup.historyService.toHistoryEntryDto(createdHistoryEntry);
expect(historyEntry.identifier).toEqual(historyEntryDto.identifier);
expect(historyEntry.title).toEqual(historyEntryDto.title);
expect(historyEntry.tags).toEqual(historyEntryDto.tags);