File tree 4 files changed +21
-5
lines changed
4 files changed +21
-5
lines changed Original file line number Diff line number Diff line change 1
1
<script setup lang="ts">
2
- import CounterCard from ' @/components/counter-card.component. vue'
2
+ import CounterCard from ' @/components/counter-card.vue'
3
3
</script >
4
4
5
5
<template >
Original file line number Diff line number Diff line change 1
1
import { createRouter , createWebHistory } from 'vue-router'
2
- import HomePage from '~ /pages/HomePage .vue'
2
+ import HomePage from '@ /pages/home-page .vue'
3
3
4
4
const router = createRouter ( {
5
5
history : createWebHistory ( import . meta. env . BASE_URL ) ,
Original file line number Diff line number Diff line change 1
1
import { describe , it , expect } from 'vitest'
2
2
3
3
import { shallowMount } from '@vue/test-utils'
4
- import CounterCard from '../../src/components/counter-card.component. vue'
4
+ import CounterCard from '../../src/components/counter-card.vue'
5
5
import { createPinia , setActivePinia } from 'pinia'
6
6
7
- describe ( 'CounterCard ' , ( ) => {
8
- it ( 'renders properly' , ( ) => {
7
+ describe ( 'Counter card ' , ( ) => {
8
+ it ( 'should render properly' , ( ) => {
9
9
setActivePinia ( createPinia ( ) )
10
10
const wrapper = shallowMount ( CounterCard , { props : { msg : 'Hello VueJS' } } )
11
11
Original file line number Diff line number Diff line change
1
+ import { describe , it , expect } from 'vitest'
2
+
3
+ import { shallowMount } from '@vue/test-utils'
4
+ import { createPinia , setActivePinia } from 'pinia'
5
+ import HomePage from '../../src/pages/home-page.vue'
6
+ import CounterCard from '../../src/components/counter-card.vue'
7
+
8
+ describe ( 'Home page' , ( ) => {
9
+ it ( 'should display a counter card' , ( ) => {
10
+ setActivePinia ( createPinia ( ) )
11
+ const wrapper = shallowMount ( HomePage )
12
+ const counterCard = wrapper . findComponent ( CounterCard )
13
+
14
+ expect ( counterCard . exists ( ) ) . toBe ( true )
15
+ } )
16
+ } )
You can’t perform that action at this time.
0 commit comments