38 lines
896 B
TypeScript
38 lines
896 B
TypeScript
import { describe, it, expect } from 'vitest'
|
|
|
|
import { mount } from '@vue/test-utils'
|
|
import BaseCheckbox from '../BaseCheckbox.vue'
|
|
|
|
describe('BaseCheckbox', () => {
|
|
it('renders properly', () => {
|
|
const wrapper = mount(BaseCheckbox, { props: {
|
|
checked: true,
|
|
} })
|
|
cy.get('[data-cy="base-checkbox"]').should('exist')
|
|
|
|
// expect(wrapper.text()).toContain('Hello Vitest')
|
|
})
|
|
})
|
|
|
|
|
|
|
|
describe('BaseCheckbox', () => {
|
|
it('renders the checkbox (invisible)', () => {
|
|
mount(BaseCheckbox, {
|
|
checked: true,
|
|
})
|
|
cy.get('[data-cy="base-checkbox"]').should('exist')
|
|
|
|
})
|
|
|
|
// it('contains the correct number of todos', () => {
|
|
// const todos = [
|
|
// { text: 'Buy milk', id: 1 },
|
|
// { text: 'Learn Component Testing', id: 2 },
|
|
// ]
|
|
|
|
// mount(<TodoList todos={todos} />)
|
|
|
|
// cy.get('[data-testid=todos]').should('have.length', todos.length)
|
|
// })
|
|
}) |