File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
test/nuxt/components/compare Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,16 @@ vi.mock('@vueuse/router', () => ({
104104 useRouteQuery : ( ) => ref ( '' ) ,
105105} ) )
106106
107+ function findCategoryActionButton (
108+ component : Awaited < ReturnType < typeof mountSuspended > > ,
109+ category : string ,
110+ action : 'all' | 'none' ,
111+ ) {
112+ return component . find (
113+ `button[data-facet-category="${ category } "][data-facet-category-action="${ action } "]` ,
114+ )
115+ }
116+
107117describe ( 'FacetSelector' , ( ) => {
108118 beforeEach ( ( ) => {
109119 mockSelectedFacets . value = [ 'downloads' , 'types' ]
@@ -236,16 +246,6 @@ describe('FacetSelector', () => {
236246 } )
237247
238248 describe ( 'category all/none buttons' , ( ) => {
239- function findCategoryActionButton (
240- component : Awaited < ReturnType < typeof mountSuspended > > ,
241- category : string ,
242- action : 'all' | 'none' ,
243- ) {
244- return component . find (
245- `button[data-facet-category="${ category } "][data-facet-category-action="${ action } "]` ,
246- )
247- }
248-
249249 it ( 'calls selectCategory when all button is clicked' , async ( ) => {
250250 const component = await mountSuspended ( FacetSelector )
251251
You can’t perform that action at this time.
0 commit comments