mirror of
https://github.com/nowcommunity/nowdatabase.git
synced 2026-10-12 19:13:52 +03:00
lint fixes
This commit is contained in:
committed by
Aaro Koivukangas
parent
1b1be1ca51
commit
92acd21920
@@ -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,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'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user