Skip to content

Commit

Permalink
Uh
Browse files Browse the repository at this point in the history
  • Loading branch information
zysim committed May 5, 2024
1 parent 1089dbe commit 1e46496
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions components/elements/buttons/DropDown/DropDown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Explicitly-importing these because tests don't like the auto-imports - zysim
import { provide, ref } from 'vue'
import BaseButton from '../BaseButton/BaseButton.vue'
import type { Ref } from 'vue'
export interface SharedState {
active: Ref<boolean>
Expand Down
6 changes: 3 additions & 3 deletions components/elements/buttons/DropDown/DropDownItem.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@ import type { ComponentMountingOptions } from '@vue/test-utils'

enableAutoUnmount(afterEach)

function mountDropDownItem(
function mountDropdownItem(
options?: ComponentMountingOptions<typeof DropdownItem>,
) {
return shallowMount(DropdownItem, options)
}

describe('<DropdownItem />', () => {
it('should render without crashing', () => {
const wrapper = mountDropDownItem({
const wrapper = mountDropdownItem({
props: { slots: 'test' },
})
expect(wrapper.isVisible()).toBe(true)
})

it("should trigger the click event when it's, well, clicked on", async () => {
const wrapper = mountDropDownItem({})
const wrapper = mountDropdownItem({})

await getByTestId(wrapper, 'container').trigger('click')

Expand Down

0 comments on commit 1e46496

Please sign in to comment.