refactor: delete the compatibility config surface
This commit is contained in:
@@ -7,7 +7,6 @@ import {
|
||||
resolveProfile,
|
||||
loadEnv,
|
||||
renderStyles,
|
||||
resolveCompatibility,
|
||||
validateAppConfig,
|
||||
explainAppConfig,
|
||||
} from "../src/index.ts";
|
||||
@@ -16,18 +15,6 @@ afterEach(() => {
|
||||
delete process.env.WRNEXUS_PROFILE;
|
||||
});
|
||||
|
||||
test("compatibility dates pin behavior and reject invalid or future policies", () => {
|
||||
expect(
|
||||
resolveCompatibility({ compatibilityDate: "2026-08-02", frameworkBehaviour: 1 }),
|
||||
).toMatchObject({ needsUpgrade: false, future: false, effectiveBehaviour: 1 });
|
||||
expect(validateAppConfig({ compatibilityDate: "2026-02-31" })).toContainEqual(
|
||||
expect.objectContaining({ path: "compatibilityDate", severity: "error" }),
|
||||
);
|
||||
expect(validateAppConfig({ frameworkBehaviour: 2 })).toContainEqual(
|
||||
expect.objectContaining({ severity: "error" }),
|
||||
);
|
||||
});
|
||||
|
||||
test("observability config requires bounded sampling and a valid OTLP endpoint", () => {
|
||||
expect(validateAppConfig({ observability: { sampleRate: Number.NaN } })).toContainEqual(
|
||||
expect.objectContaining({ path: "observability.sampleRate", severity: "error" }),
|
||||
|
||||
Reference in New Issue
Block a user