# Function getTestCasesByTags

- getTestCasesByTags(
  tags: readonly string[],
  ): readonly (SafetyTestCase & { categoryId: SafetyCategoryIdType })[]

  Get test cases filtered by tags.

  #### Parameters

  - tags: readonly string[]

    Tags to filter by (any match)

  #### Returns readonly (SafetyTestCase & { categoryId: SafetyCategoryIdType })[]

  Array of matching test cases

  - Defined in packages/nexus-agents/src/security/safety-bench/safety-categories.ts:139