22 lines
615 B
TypeScript
22 lines
615 B
TypeScript
import { mount } from '@vue/test-utils'
|
|
import { describe, expect, it } from 'vitest'
|
|
|
|
import ErrorPage from './error.vue'
|
|
|
|
describe('ErrorPage', () => {
|
|
it('renders a branded not-found page with a way home', () => {
|
|
const wrapper = mount(ErrorPage, {
|
|
props: {
|
|
error: {
|
|
statusCode: 404,
|
|
statusMessage: 'Page not found',
|
|
},
|
|
},
|
|
})
|
|
|
|
expect(wrapper.get('h1').text()).toBe('صفحه پیدا نشد')
|
|
expect(wrapper.get('a').attributes('href')).toBe('/')
|
|
expect(wrapper.get('[role="img"]').attributes('aria-label')).toBe('زرینپال')
|
|
})
|
|
})
|