Skip to content

Commit f15e3aa

Browse files
committed
test: update
1 parent 51fcd1b commit f15e3aa

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

test/e2e/badge.spec.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff 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}"`)

0 commit comments

Comments
 (0)