19 lines
610 B
JavaScript
19 lines
610 B
JavaScript
import { describe, it, expect, beforeEach } from 'vitest'
|
|
import { mountSuspended, registerEndpoint } from '@nuxt/test-utils/runtime'
|
|
import Poi from '../../app/pages/poi.vue'
|
|
|
|
describe('poi page', () => {
|
|
beforeEach(() => {
|
|
registerEndpoint('/api/pois', () => [])
|
|
registerEndpoint('/api/me', () => null, { method: 'GET' })
|
|
})
|
|
|
|
it.each([
|
|
['POI placement heading', 'POI placement'],
|
|
['view-only message', /View-only|Sign in as admin/],
|
|
])('renders %s', async (description, expected) => {
|
|
const wrapper = await mountSuspended(Poi)
|
|
expect(wrapper.text()).toMatch(expected)
|
|
})
|
|
})
|