Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,19 @@ describe('useUpdatePreventAIFeature', () => {
expect(
updatedConfig.github_organizations?.['org-1']?.org_defaults?.vanilla?.enabled
).toBe(true);
// Should not mutate original
expect(config.github_organizations?.['org-1']?.org_defaults?.vanilla?.enabled).toBe(
false
);
});

it('should handle sensitivity parameter correctly', () => {
const config = structuredClone(mockOrg.preventAiConfigGithub!);
const updatedConfig = makePreventAIConfig(config, {
feature: 'vanilla',
enabled: true,
orgName: 'org-1',
sensitivity: 'high',
});
expect(
updatedConfig.github_organizations?.['org-1']?.org_defaults?.vanilla?.sensitivity
).toBe('high');
});

it('should update the correct feature config in repo_overrides', () => {
Expand Down
Loading