Skip to content

Commit

Permalink
test(unit): improvement spec in docs validation
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasferreiralimax committed Feb 7, 2024
1 parent 0dcc55d commit 124b2a7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
11 changes: 10 additions & 1 deletion docs/src/__tests__/App.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,19 @@ import { describe, it, expect } from 'vitest'

import { mount } from '@vue/test-utils'
import App from '@/App.vue'
import { techs } from '../../../src/components/__tests__/mock'

describe('App', () => {
it('renders properly', () => {
it('renders basic app exists', () => {
const wrapper = mount(App)
expect(wrapper.exists()).toBeTruthy()
})

it('renders components with loop and check name', () => {
const wrapper = mount(App)

for(let item of techs) {
expect(wrapper.text()).toContain(item.name)
}
})
})
2 changes: 1 addition & 1 deletion src/components/__tests__/VueTechsLogos.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe('VueTechsLogos', () => {
expect(wrapper.text()).toContain('Vue')
expect(wrapper.text()).toContain('Test Vue')
})
it('renders properly', () => {
it('renders components with loop and check name', () => {
const wrapper = mount(VueTechsLogos)

for(let item of techs) {
Expand Down

0 comments on commit 124b2a7

Please sign in to comment.