Skip to content

Commit 654d145

Browse files
committed
test(ui): type the list item lookup in the switch field test
The lookup of the shared list item resolved to an unresolved type and tripped no-unsafe-call. Cast the component the way the settings tests do. Signed-off-by: TheMeinerLP <github@themeinerlp.dev>
1 parent ee30336 commit 654d145

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎reposilite-frontend/src/components/renderers/SwitchField.test.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
import { describe, it, expect } from 'vitest'
1818
import { mount } from '@vue/test-utils'
19+
import type { Component } from 'vue'
1920
import MdListItem from '../md/MdListItem.vue'
2021
import SwitchField from './SwitchField.vue'
2122

@@ -85,7 +86,7 @@ describe('SwitchField', () => {
8586
it('is one row of the shared list item', () => {
8687
const wrapper = mountSwitch()
8788

88-
expect(wrapper.findComponent(MdListItem).exists()).toBe(true)
89+
expect(wrapper.findComponent(MdListItem as Component).exists()).toBe(true)
8990
expect(wrapper.find('ul > li').exists()).toBe(true)
9091
})
9192

0 commit comments

Comments
 (0)