mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-06 05:51:15 +08:00
27 lines
830 B
TypeScript
27 lines
830 B
TypeScript
// Gateway Protocol tests cover push behavior.
|
|
import { Compile } from "typebox/compile";
|
|
import { describe, expect, it } from "vitest";
|
|
import { PushTestResultSchema } from "./schema/push.js";
|
|
|
|
/**
|
|
* Push protocol schema regression for APNS test results.
|
|
* The transport field tells operators whether delivery used direct APNS or the
|
|
* relay path, so it is part of the public result contract.
|
|
*/
|
|
describe("gateway protocol push schema", () => {
|
|
const validatePushTestResult = Compile(PushTestResultSchema);
|
|
|
|
it("accepts push.test results with a transport", () => {
|
|
expect(
|
|
validatePushTestResult.Check({
|
|
ok: true,
|
|
status: 200,
|
|
tokenSuffix: "abcd1234",
|
|
topic: "ai.openclaw.ios",
|
|
environment: "production",
|
|
transport: "relay",
|
|
}),
|
|
).toBe(true);
|
|
});
|
|
});
|