File tree Expand file tree Collapse file tree
test/nuxt/components/compare Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -75,13 +75,10 @@ if (layoutTier.value !== 'summary') {
7575 ` https://api.npmjs.org/downloads/point/last-week/${encoded } ` ,
7676 { timeout: FETCH_TIMEOUT_MS },
7777 ).catch (() => null ),
78- $fetch <{ ' dist-tags' ? : { latest? : string } }>(
79- ` https://registry.npmjs.org/${encoded } ` ,
80- {
81- timeout: FETCH_TIMEOUT_MS ,
82- headers: { Accept: ' application/vnd.npm.install-v1+json' },
83- },
84- ).catch (() => null ),
78+ $fetch <{ ' dist-tags' ? : { latest? : string } }>(` https://registry.npmjs.org/${encoded } ` , {
79+ timeout: FETCH_TIMEOUT_MS ,
80+ headers: { Accept: ' application/vnd.npm.install-v1+json' },
81+ }).catch (() => null ),
8582 ])
8683 return {
8784 name ,
@@ -302,16 +299,13 @@ const summaryRemainder = computed(() =>
302299 }"
303300 >{{ pkg.name }}</span
304301 >
305- <span
306- v-if =" pkg.version"
307- class =" text-xs text-[#525252]"
308- >{{ pkg.version }}</span >
302+ <span v-if =" pkg.version" class =" text-xs text-[#a3a3a3]" >{{ pkg.version }}</span >
309303 </span >
310304 <span class =" flex items-baseline gap-0.5" >
311305 <span class =" text-2xl font-bold text-[#e5e5e5]" >{{
312306 formatDownloads(pkg.downloads)
313307 }}</span >
314- <span class =" text-sm font-medium text-[#737373 ]" >/wk</span >
308+ <span class =" text-sm font-medium text-[#a3a3a3 ]" >/wk</span >
315309 </span >
316310 </span >
317311 </div >
Original file line number Diff line number Diff line change @@ -142,7 +142,7 @@ defineOgImageComponent('Compare', {
142142 packages : () => packages .value ,
143143 emptyDescription : () => $t (' compare.packages.meta_description_empty' ),
144144})
145-
145+
146146const { announce } = useCommandPalette ()
147147
148148useCommandPaletteContextCommands (
Original file line number Diff line number Diff line change @@ -100,6 +100,16 @@ vi.mock('@vueuse/router', () => ({
100100 useRouteQuery : ( ) => ref ( '' ) ,
101101} ) )
102102
103+ function findCategoryActionButton (
104+ component : Awaited < ReturnType < typeof mountSuspended > > ,
105+ category : string ,
106+ action : 'all' | 'none' ,
107+ ) {
108+ return component . find (
109+ `button[data-facet-category="${ category } "][data-facet-category-action="${ action } "]` ,
110+ )
111+ }
112+
103113describe ( 'FacetSelector' , ( ) => {
104114 beforeEach ( ( ) => {
105115 mockSelectedFacets . value = [ 'downloads' , 'types' ]
@@ -232,16 +242,6 @@ describe('FacetSelector', () => {
232242 } )
233243
234244 describe ( 'category all/none buttons' , ( ) => {
235- function findCategoryActionButton (
236- component : Awaited < ReturnType < typeof mountSuspended > > ,
237- category : string ,
238- action : 'all' | 'none' ,
239- ) {
240- return component . find (
241- `button[data-facet-category="${ category } "][data-facet-category-action="${ action } "]` ,
242- )
243- }
244-
245245 it ( 'calls selectCategory when all button is clicked' , async ( ) => {
246246 const component = await mountSuspended ( FacetSelector )
247247
You can’t perform that action at this time.
0 commit comments