This repository has been archived on 2024-02-08. You can view files and clone it, but cannot push or open issues or pull requests.
frontend/src/components/base/__tests__/BaseCheckbox.spec.ts

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)
// })
})