Skip to content

Commit 1511500

Browse files
committed
test(detection-strategy.schema): update tests to reflect unique vals only for x_mitre_analytic_refs
1 parent ab95e44 commit 1511500

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

test/objects/detection-strategy.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -226,14 +226,14 @@ describe('detectionStrategySchema', () => {
226226
});
227227

228228
describe('Edge Cases and Special Scenarios', () => {
229-
it('should handle duplicate analytic IDs', () => {
229+
it('should reject duplicate analytic IDs', () => {
230230
const analyticId = `x-mitre-analytic--${uuidv4()}`;
231231
const detectionStrategyWithDuplicates: DetectionStrategy = {
232232
...minimalDetectionStrategy,
233233
x_mitre_analytic_refs: [analyticId, analyticId, analyticId],
234234
};
235-
// Schema doesn't prevent duplicates, so this should pass
236-
expect(() => detectionStrategySchema.parse(detectionStrategyWithDuplicates)).not.toThrow();
235+
// Schema prevents duplicates, so this should fail
236+
expect(() => detectionStrategySchema.parse(detectionStrategyWithDuplicates)).toThrow();
237237
});
238238

239239
it('should handle large number of analytics', () => {

0 commit comments

Comments
 (0)