File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -102,9 +102,17 @@ test.describe('badge API', () => {
102102 } )
103103 } )
104104
105- test ( 'custom color parameter is applied to SVG' , async ( { page, baseURL } ) => {
105+ test ( 'custom colorA parameter is applied to SVG' , async ( { page, baseURL } ) => {
106+ const customColor = '00ff00'
107+ const url = toLocalUrl ( baseURL , `/api/registry/badge/version/nuxt?colorA=${ customColor } ` )
108+ const { body } = await fetchBadge ( page , url )
109+
110+ expect ( body ) . toContain ( `fill="#${ customColor } "` )
111+ } )
112+
113+ test ( 'custom colorB parameter is applied to SVG' , async ( { page, baseURL } ) => {
106114 const customColor = 'ff69b4'
107- const url = toLocalUrl ( baseURL , `/api/registry/badge/version/nuxt?color =${ customColor } ` )
115+ const url = toLocalUrl ( baseURL , `/api/registry/badge/version/nuxt?colorB =${ customColor } ` )
108116 const { body } = await fetchBadge ( page , url )
109117
110118 expect ( body ) . toContain ( `fill="#${ customColor } "` )
You can’t perform that action at this time.
0 commit comments