Files
wehub-resource-sync 070959e133
landing-page-staging / Deploy landing page to staging (push) Has been skipped
landing-page-ci / Validate landing page (push) Failing after 4s
visual-baseline / Capture visual baselines (push) Has been cancelled
bake-plugin-previews / Bake plugin previews (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:00:47 +08:00

24 lines
767 B
TypeScript

import { describe, expect, it } from 'vitest';
import { mediaExecutionPolicyForProjectMetadata } from '../../src/media/execution-policy';
describe('media execution policy for project metadata', () => {
it('keeps image projects without an explicit model enabled so the agent can ask', () => {
expect(mediaExecutionPolicyForProjectMetadata({ kind: 'image' })).toEqual({
mode: 'enabled',
allowedSurfaces: ['image'],
});
});
it('scopes media projects to their selected model when one is present', () => {
expect(mediaExecutionPolicyForProjectMetadata({
kind: 'image',
imageModel: 'gpt-image-2',
})).toEqual({
mode: 'enabled',
allowedSurfaces: ['image'],
allowedModels: ['gpt-image-2'],
});
});
});