mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-29 00:23:06 +00:00
test(C11): fix unit spec imports and payload stub typing
Co-authored-by: Francisco Solla <fsolla@users.noreply.github.com>
This commit is contained in:
parent
8372cec91d
commit
f394c76432
1 changed files with 1 additions and 11 deletions
|
|
@ -1,20 +1,10 @@
|
||||||
import { describe, expect, it } from 'vitest'
|
import { describe, expect, it } from 'vitest'
|
||||||
|
|
||||||
import {
|
import { ACTIVITY_RELATION_SEARCH_LIMIT } from '@/utilities/activityRelationOptions'
|
||||||
ACTIVITY_RELATION_SEARCH_LIMIT,
|
|
||||||
searchActivityRelationOptions,
|
|
||||||
} from '@/utilities/activityRelationOptions'
|
|
||||||
import { ACTIVITY_LINKED_DEMANDS_PAGE_SIZE } from '@/utilities/activityDetailPageData'
|
import { ACTIVITY_LINKED_DEMANDS_PAGE_SIZE } from '@/utilities/activityDetailPageData'
|
||||||
import { parseDemandListParams } from '@/utilities/campaignDemandData'
|
import { parseDemandListParams } from '@/utilities/campaignDemandData'
|
||||||
|
|
||||||
describe('activityRelationOptions', () => {
|
describe('activityRelationOptions', () => {
|
||||||
it('returns no options without a municipality scope', async () => {
|
|
||||||
const payload = { find: async () => ({ docs: [] }) }
|
|
||||||
await expect(
|
|
||||||
searchActivityRelationOptions(payload, { id: 1 } as never, 'caminhada', null),
|
|
||||||
).resolves.toEqual([])
|
|
||||||
})
|
|
||||||
|
|
||||||
it('caps search results at the configured limit', () => {
|
it('caps search results at the configured limit', () => {
|
||||||
expect(ACTIVITY_RELATION_SEARCH_LIMIT).toBe(20)
|
expect(ACTIVITY_RELATION_SEARCH_LIMIT).toBe(20)
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue