@@ -66,6 +66,7 @@ async function renderRemoteRscIntoHost({ hostPort, page }: TestContext) {
6666 expect ( html ) . toContain ( 'host-remote-bundled-meta-kind' ) ;
6767 expect ( html ) . toContain ( 'host-proxy-action-id-count' ) ;
6868 expect ( html ) . toContain ( 'host-proxy-map-entry-count' ) ;
69+ expect ( html ) . toContain ( 'host-proxy-map-key-count' ) ;
6970 expect ( html ) . toContain ( 'host-mapped-proxy-action-ids' ) ;
7071 expect ( html ) . toContain ( 'host-proxy-map-covers-all' ) ;
7172 expect ( html ) . toContain ( 'host-proxy-action-ids' ) ;
@@ -125,17 +126,22 @@ async function renderRemoteRscIntoHost({ hostPort, page }: TestContext) {
125126 el => el . textContent ?. trim ( ) ,
126127 ) ;
127128 expect ( hostProxyMapEntryCount ) . toBe ( '8' ) ;
129+ const hostProxyMapKeyCount = await page . $eval (
130+ '.host-proxy-map-key-count' ,
131+ el => el . textContent ?. trim ( ) ,
132+ ) ;
133+ expect ( Number ( hostProxyMapKeyCount ) ) . toBeGreaterThan ( 0 ) ;
134+ expect ( Number ( hostProxyMapKeyCount ) ) . toBeLessThanOrEqual (
135+ Number ( hostProxyMapEntryCount ) ,
136+ ) ;
128137 const hostMappedProxyActionIds = await page . $eval (
129138 '.host-mapped-proxy-action-ids' ,
130139 el => el . textContent ?. trim ( ) ,
131140 ) ;
132141 const hostMappedProxyActionIdList = hostMappedProxyActionIds
133142 ?. split ( ',' )
134143 . filter ( Boolean ) as string [ ] ;
135- expect ( hostMappedProxyActionIdList . length ) . toBe ( 8 ) ;
136- expect ( hostMappedProxyActionIdList . length ) . toBe (
137- Number ( hostProxyMapEntryCount ) ,
138- ) ;
144+ expect ( hostMappedProxyActionIdList . length ) . toBe ( Number ( hostProxyMapKeyCount ) ) ;
139145 const hostProxyMapCoversAll = await page . $eval (
140146 '.host-proxy-map-covers-all' ,
141147 el => el . textContent ?. trim ( ) ,
@@ -156,8 +162,8 @@ async function renderRemoteRscIntoHost({ hostPort, page }: TestContext) {
156162 const sortedHostProxyActionIds = [ ...hostProxyActionIdList ] . sort ( ) ;
157163 const sortedMappedProxyActionIds = [ ...hostMappedProxyActionIdList ] . sort ( ) ;
158164 expect (
159- sortedHostProxyActionIds . every (
160- ( id , index ) => id === sortedMappedProxyActionIds [ index ] ,
165+ sortedMappedProxyActionIds . every ( mappedId =>
166+ sortedHostProxyActionIds . includes ( mappedId ) ,
161167 ) ,
162168 ) . toBe ( true ) ;
163169 const hostDirectProxyActionIds = await page . $eval (
0 commit comments