Merge remote-tracking branch 'upstream/develop' into feat/accept-status-codes-backend

# Conflicts:
#	server/src/service/infrastructure/network/HttpProvider.ts
This commit is contained in:
harsh-aghara committed 2026-06-05 00:58:35 +05:30
commit d2c13fac5a
34 files changed
+1887 -540

No files matched your search

@@ -70,7 +70,7 @@ const makeGotResponse = (overrides?: Record<string, any>) => ({
statusMessage: "OK",
headers: { "content-type": "text/html" },
body: "<html></html>",
timings: { phases: { total: 100 } },
timings: { phases: { firstByte: 100, total: 120 } },
...overrides,
});
@@ -182,8 +182,8 @@ describe("HttpProvider", () => {
);
});
it("defaults responseTime to 0 when timings.phases.total is undefined", async () => {
mockGot.mockResolvedValue(makeGotResponse({ timings: { phases: { total: undefined } } }));
it("defaults responseTime to 0 when timings.phases.firstByte is undefined", async () => {
mockGot.mockResolvedValue(makeGotResponse({ timings: { phases: { firstByte: undefined } } }));
const { provider } = createProvider();
const result = await provider.handle(makeMonitor());
@@ -224,11 +224,11 @@ describe("HttpProvider", () => {
expect(result.message).toBe("Response is not JSON");
});
it("defaults responseTime to 0 in non-JSON jsonPath response when total is undefined", async () => {
it("defaults responseTime to 0 in non-JSON jsonPath response when firstByte is undefined", async () => {
mockGot.mockResolvedValue(
makeGotResponse({
headers: { "content-type": "text/html" },
timings: { phases: { total: undefined } },
timings: { phases: { firstByte: undefined } },
})
);
const { provider } = createProvider();