Skip to content

Commit 5c32685

Browse files
committed
Sort info keys for test stability
1 parent e0b6ce9 commit 5c32685

File tree

2 files changed

+8
-69
lines changed

2 files changed

+8
-69
lines changed

integration/browser-entry-test.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -216,14 +216,14 @@ test("allows users to instrument the client side router via HydratedRouter", asy
216216
router(router) {
217217
router.instrument({
218218
async navigate(impl, info) {
219-
console.log("start navigate", JSON.stringify(info));
219+
console.log("start navigate", JSON.stringify(Object.entries(info).sort()));
220220
await impl();
221-
console.log("end navigate", JSON.stringify(info));
221+
console.log("end navigate", JSON.stringify(Object.entries(info).sort()));
222222
},
223223
async fetch(impl, info) {
224-
console.log("start fetch", JSON.stringify(info));
224+
console.log("start fetch", JSON.stringify(Object.entries(info).sort()));
225225
await impl();
226-
console.log("end fetch", JSON.stringify(info));
226+
console.log("end fetch", JSON.stringify(Object.entries(info).sort()));
227227
}
228228
})
229229
},
@@ -294,27 +294,27 @@ test("allows users to instrument the client side router via HydratedRouter", asy
294294

295295
expect(await app.getHtml()).toContain("hello world");
296296
expect(logs).toEqual([
297-
'start navigate {"to":"/page","currentUrl":"/"}',
297+
'start navigate [["currentUrl","/"],["to","/page"]]',
298298
"start loader root /page",
299299
"start loader routes/page /page",
300300
"end loader root /page",
301301
"end loader routes/page /page",
302-
'end navigate {"to":"/page","currentUrl":"/"}',
302+
'end navigate [["currentUrl","/"],["to","/page"]]',
303303
]);
304304
logs.splice(0);
305305

306306
await page.click("[data-fetch]");
307307
await page.waitForSelector("[data-fetcher-data]");
308308
await expect(page.locator("[data-fetcher-data]")).toContainText("OK");
309309
expect(logs).toEqual([
310-
'start fetch {"href":"/page","currentUrl":"/page","fetcherKey":"a","formMethod":"post","formEncType":"application/x-www-form-urlencoded","body":{"key":"value"}}',
310+
'start fetch [["body",{"key":"value"}],["currentUrl","/page"],["fetcherKey","a"],["formData",null],["formEncType","application/x-www-form-urlencoded"],["formMethod","post"],["href","/page"]]',
311311
"start action routes/page /page",
312312
"end action routes/page /page",
313313
"start loader root /page",
314314
"start loader routes/page /page",
315315
"end loader root /page",
316316
"end loader routes/page /page",
317-
'end fetch {"href":"/page","currentUrl":"/page","fetcherKey":"a","formMethod":"post","formEncType":"application/x-www-form-urlencoded","body":{"key":"value"}}',
317+
'end fetch [["body",{"key":"value"}],["currentUrl","/page"],["fetcherKey","a"],["formData",null],["formEncType","application/x-www-form-urlencoded"],["formMethod","post"],["href","/page"]]',
318318
]);
319319

320320
appFixture.close();

pnpm-lock.yaml

Lines changed: 0 additions & 61 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)