Skip to content

Commit f02e2cf

Browse files
committed
test(rsc-mf): assert mapped proxy id coverage markers
1 parent d806ec0 commit f02e2cf

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

tests/integration/rsc-mf/tests/index.test.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@ async function renderRemoteRscIntoHost({ hostPort, page }: TestContext) {
133133
?.split(',')
134134
.filter(Boolean) as string[];
135135
expect(hostMappedProxyActionIdList.length).toBe(8);
136+
expect(hostMappedProxyActionIdList.length).toBe(
137+
Number(hostProxyMapEntryCount),
138+
);
136139
const hostProxyMapCoversAll = await page.$eval(
137140
'.host-proxy-map-covers-all',
138141
el => el.textContent?.trim(),
@@ -150,8 +153,12 @@ async function renderRemoteRscIntoHost({ hostPort, page }: TestContext) {
150153
expect(hostProxyActionIdList.every(id => /^[a-f0-9]{64,}$/i.test(id))).toBe(
151154
true,
152155
);
156+
const sortedHostProxyActionIds = [...hostProxyActionIdList].sort();
157+
const sortedMappedProxyActionIds = [...hostMappedProxyActionIdList].sort();
153158
expect(
154-
hostMappedProxyActionIdList.every(id => hostProxyActionIdList.includes(id)),
159+
sortedHostProxyActionIds.every(
160+
(id, index) => id === sortedMappedProxyActionIds[index],
161+
),
155162
).toBe(true);
156163
const hostDirectProxyActionIds = await page.$eval(
157164
'.host-direct-proxy-action-ids',

0 commit comments

Comments
 (0)