lint fixes

This commit is contained in:
Aaro Koivukangas
2024-09-12 13:36:26 +03:00
committed by Aaro Koivukangas
parent 1b1be1ca51
commit 92acd21920
4 changed files with 4 additions and 8 deletions
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-floating-promises */
import { beforeEach, describe, it, expect } from '@jest/globals'
import { LocalityDetailsType, SpeciesDetailsType } from '../../../../frontend/src/backendTypes'
import { LogRow } from '../../services/write/writeOperations/types'
@@ -35,8 +34,8 @@ describe('Creating new locality works', () => {
const speciesId = createdLocality!.now_ls.find(ls => ls.com_species.species_name === 'Newspecies')?.species_id
const speciesResult = await send<SpeciesDetailsType>(`species/${speciesId}`, 'GET')
const update = speciesResult.body.now_sau.find(update => update.sau_comment === 'new locality test update')
if (!update) throw new Error("Species update not found")
if (!speciesId) throw new Error("Species id not found")
if (!update) throw new Error('Species update not found')
if (!speciesId) throw new Error('Species id not found')
expect(update?.species_id).toEqual(speciesId) // 'Species update does not have correct id'
const logRows = update.updates
const expectedLogRows: Partial<LogRow>[] = [
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-floating-promises */
import { beforeEach, describe, it, expect } from '@jest/globals'
import { login, send } from '../utils'
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-floating-promises */
import { beforeEach, describe, it, expect } from '@jest/globals'
import { LocalityDetailsType } from '../../../../frontend/src/backendTypes'
import { LogRow } from '../../services/write/writeOperations/types'
@@ -27,8 +26,7 @@ describe('Locality update works', () => {
it('Added locality species is found', () => {
resultLocality!.now_ls.find(ls => {
ls.species_id === 21052 &&
ls.lid === 21050
ls.species_id === 21052 && ls.lid === 21050
}) //'Added locality species not found'
expect(!!resultLocality).toEqual(true)
})
+1 -1
View File
@@ -1,4 +1,4 @@
import { expect } from "@jest/globals"
import { expect } from '@jest/globals'
import { UpdateLog } from '../../../frontend/src/backendTypes'
import { LogRow } from '../services/write/writeOperations/types'