70bf21e064
Deploy (to testing) and Test Playground Preview Worker / Deploy Playground Preview Worker (testing) (push) Has been skipped
Deploy Workers Shared Staging / Deploy Workers Shared Staging (push) Failing after 0s
Prerelease / build (push) Has been skipped
Handle Changesets / Handle Changesets (push) Has been cancelled
Semgrep OSS scan / semgrep-oss (push) Has been cancelled
33 lines
858 B
TypeScript
33 lines
858 B
TypeScript
import { FlagshipOptionsSchema } from "miniflare";
|
|
import { test } from "vitest";
|
|
|
|
test("FlagshipOptionsSchema: accepts valid flagship options", ({ expect }) => {
|
|
const result = FlagshipOptionsSchema.safeParse({
|
|
flagship: {
|
|
FLAGS: {
|
|
app_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
|
},
|
|
},
|
|
});
|
|
expect(result.success).toBe(true);
|
|
});
|
|
|
|
test("FlagshipOptionsSchema: accepts flagship with remoteProxyConnectionString", ({
|
|
expect,
|
|
}) => {
|
|
const result = FlagshipOptionsSchema.safeParse({
|
|
flagship: {
|
|
FLAGS: {
|
|
app_id: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
|
|
remoteProxyConnectionString: "test-connection-string",
|
|
},
|
|
},
|
|
});
|
|
expect(result.success).toBe(true);
|
|
});
|
|
|
|
test("FlagshipOptionsSchema: accepts empty flagship", ({ expect }) => {
|
|
const result = FlagshipOptionsSchema.safeParse({});
|
|
expect(result.success).toBe(true);
|
|
});
|