15 lines
447 B
JavaScript
15 lines
447 B
JavaScript
import { describe, it, expect } from 'vitest'
|
|
import { getValidFeeds } from '../../server/utils/feedUtils.js'
|
|
|
|
describe('API contract', () => {
|
|
it('getValidFeeds returns array suitable for API response', () => {
|
|
const raw = [
|
|
{ id: '1', name: 'A', lat: 1, lng: 2 },
|
|
{ id: '2', name: 'B', lat: 3, lng: 4 },
|
|
]
|
|
const out = getValidFeeds(raw)
|
|
expect(Array.isArray(out)).toBe(true)
|
|
expect(out).toHaveLength(2)
|
|
})
|
|
})
|