import {Change} from '../../src/schemas'

type Vulnerability = Change['vulnerabilities'][0]

const defaultTestVulnerability: Vulnerability = {
  severity: 'high',
  advisory_ghsa_id: 'GHSA-35jh-r3h4-6jhm',
  advisory_summary: 'Command Injection in lodash',
  advisory_url: 'https://github.com/advisories/GHSA-35jh-r3h4-6jhm'
}

const createTestVulnerability = (
  overwrites: Partial<Vulnerability> = {}
): Vulnerability => ({
  ...defaultTestVulnerability,
  ...overwrites
})

export {createTestVulnerability}
