feat(FN-4650): complete Step 1 — add sandbox experimental helper
Fusion-Task-Id: FN-4650 Fusion-Task-Lineage: 3da8db80-236b-46f6-8122-644abda35ca3
This commit is contained in:
@@ -5,6 +5,7 @@ import {
|
||||
PROJECT_SETTINGS_KEYS,
|
||||
SANDBOX_BACKEND_NAMES,
|
||||
SANDBOX_FAILURE_MODES,
|
||||
isSandboxExperimentalEnabled,
|
||||
validateSandboxBackendName,
|
||||
validateSandboxFailureMode,
|
||||
validateSandboxPolicy,
|
||||
@@ -102,4 +103,22 @@ describe("sandbox settings", () => {
|
||||
expect(validateSandboxProjectSettings("nope")).toBeUndefined();
|
||||
});
|
||||
});
|
||||
|
||||
describe("isSandboxExperimentalEnabled", () => {
|
||||
it("returns false for undefined settings", () => {
|
||||
expect(isSandboxExperimentalEnabled(undefined)).toBe(false);
|
||||
});
|
||||
|
||||
it("returns false when sandbox flag is missing", () => {
|
||||
expect(isSandboxExperimentalEnabled({ experimentalFeatures: {} })).toBe(false);
|
||||
});
|
||||
|
||||
it("returns false when sandbox flag is false", () => {
|
||||
expect(isSandboxExperimentalEnabled({ experimentalFeatures: { sandbox: false } })).toBe(false);
|
||||
});
|
||||
|
||||
it("returns true when sandbox flag is true", () => {
|
||||
expect(isSandboxExperimentalEnabled({ experimentalFeatures: { sandbox: true } })).toBe(true);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user