Skip to content

Commit f70268b

Browse files
committed
fix(infra): move surrogate-pair test to describe scope level
The regression test in push-apns.test.ts was inadvertently nested inside the previous it() callback, causing CI failures with 'Calling the test function inside another test function is not allowed'. Move it to the correct scope inside the describe block.
1 parent 0919ded commit f70268b

1 file changed

Lines changed: 23 additions & 23 deletions

File tree

src/infra/push-apns.test.ts

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -836,31 +836,31 @@ describe("push APNs send semantics", () => {
836836
environment: "production",
837837
transport: "relay",
838838
});
839+
});
839840

840-
it("does not split surrogate pairs when truncating non-JSON error bodies", async () => {
841-
const { send, registration, auth } = createDirectApnsSendFixture({
842-
nodeId: "ios-node-surrogate-reason",
843-
environment: "sandbox",
844-
sendResult: {
845-
status: 400,
846-
apnsId: "apns-surrogate-reason-id",
847-
body: "x".repeat(199) + "🚀tail",
848-
},
849-
});
850-
851-
const result = await sendApnsAlert({
852-
registration,
853-
nodeId: "ios-node-surrogate-reason",
854-
title: "Wake",
855-
body: "Ping",
856-
auth,
857-
requestSender: send,
858-
});
841+
it("does not split surrogate pairs when truncating non-JSON error bodies", async () => {
842+
const { send, registration, auth } = createDirectApnsSendFixture({
843+
nodeId: "ios-node-surrogate-reason",
844+
environment: "sandbox",
845+
sendResult: {
846+
status: 400,
847+
apnsId: "apns-surrogate-reason-id",
848+
body: "x".repeat(199) + "🚀tail",
849+
},
850+
});
859851

860-
const record = requireRecord(result, "APNs result");
861-
expect(record.reason).not.toContain("�");
862-
expect(record.ok).toBe(false);
863-
expect(record.status).toBe(400);
852+
const result = await sendApnsAlert({
853+
registration,
854+
nodeId: "ios-node-surrogate-reason",
855+
title: "Wake",
856+
body: "Ping",
857+
auth,
858+
requestSender: send,
864859
});
860+
861+
const record = requireRecord(result, "APNs result");
862+
expect(record.reason).not.toContain("�");
863+
expect(record.ok).toBe(false);
864+
expect(record.status).toBe(400);
865865
});
866866
});

0 commit comments

Comments
 (0)