initial commit
This commit is contained in:
14
test/nuxt/api.spec.js
Normal file
14
test/nuxt/api.spec.js
Normal file
@@ -0,0 +1,14 @@
|
||||
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)
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user