fixed some frontend tests
All checks were successful
Chore App Build, Test, and Push Docker Images / build-and-push (push) Successful in 3m51s
All checks were successful
Chore App Build, Test, and Push Docker Images / build-and-push (push) Successful in 3m51s
This commit is contained in:
@@ -1,11 +1,18 @@
|
|||||||
import { describe, it, expect } from 'vitest'
|
import { describe, it, expect } from 'vitest'
|
||||||
import { mount } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
|
import { createMemoryHistory, createRouter } from 'vue-router'
|
||||||
import App from '../App.vue'
|
import App from '../App.vue'
|
||||||
|
|
||||||
|
const mockRouter = createRouter({
|
||||||
|
history: createMemoryHistory(),
|
||||||
|
routes: [{ path: '/', name: 'Home', component: { template: '<div />' } }],
|
||||||
|
})
|
||||||
|
|
||||||
describe('App', () => {
|
describe('App', () => {
|
||||||
it('mounts renders properly', () => {
|
it('mounts renders properly', () => {
|
||||||
const wrapper = mount(App, {
|
const wrapper = mount(App, {
|
||||||
global: {
|
global: {
|
||||||
|
plugins: [mockRouter],
|
||||||
stubs: {
|
stubs: {
|
||||||
'router-view': {
|
'router-view': {
|
||||||
template: '<div>You did it!</div>',
|
template: '<div>You did it!</div>',
|
||||||
|
|||||||
Reference in New Issue
Block a user