@@ -124,7 +124,7 @@ test.describe('badge API', () => {
124124 const { body } = await fetchBadge ( page , url )
125125
126126 expect ( body ) . toContain ( 'fill="#ffffff">version' )
127- expect ( body ) . toContain ( / f i l l = " # 0 0 0 0 0 0 " > v \d / )
127+ expect ( body ) . toMatch ( / f i l l = " # 0 0 0 0 0 0 " > v \d / )
128128 } )
129129
130130 test ( 'dark color keeps white text for contrast' , async ( { page, baseURL } ) => {
@@ -133,7 +133,7 @@ test.describe('badge API', () => {
133133 const { body } = await fetchBadge ( page , url )
134134
135135 expect ( body ) . toContain ( 'fill="#ffffff">version' )
136- expect ( body ) . toContain ( / f i l l = " # f f f f f f " > v \d / )
136+ expect ( body ) . toMatch ( / f i l l = " # f f f f f f " > v \d / )
137137 } )
138138
139139 test ( 'light labelColor produces dark label text for contrast' , async ( { page, baseURL } ) => {
@@ -142,7 +142,7 @@ test.describe('badge API', () => {
142142 const { body } = await fetchBadge ( page , url )
143143
144144 expect ( body ) . toContain ( 'fill="#000000">version' )
145- expect ( body ) . toContain ( / f i l l = " # f f f f f f " > v \d / )
145+ expect ( body ) . toMatch ( / f i l l = " # f f f f f f " > v \d / )
146146 } )
147147
148148 test ( '3-char hex color is handled correctly for contrast' , async ( { page, baseURL } ) => {
@@ -151,7 +151,7 @@ test.describe('badge API', () => {
151151 const { body } = await fetchBadge ( page , url )
152152
153153 expect ( body ) . toContain ( 'fill="#ffffff">version' )
154- expect ( body ) . toContain ( / f i l l = " # 0 0 0 0 0 0 " > v \d / )
154+ expect ( body ) . toMatch ( / f i l l = " # 0 0 0 0 0 0 " > v \d / )
155155 } )
156156
157157 test ( 'custom label parameter is applied to SVG' , async ( { page, baseURL } ) => {
0 commit comments