{"size": 793, "ext": "js", "max_stars_repo_path": "src/__tests__/helpers.test.js", "max_stars_repo_name": "JakeAdmire/Original-UI", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/__tests__/helpers.test.js", "max_issues_repo_name": "JakeAdmire/Original-UI", "max_issues_repo_issues_event_min_datetime": "2019-10-21T20:54:24.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-08T23:02:36.000Z", "max_forks_repo_path": "src/__tests__/helpers.test.js", "max_forks_repo_name": "JakeAdmire/Original-UI", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 10, "max_forks_count": null, "avg_line_length": 25.5806451613, "max_line_length": 101, "alphanum_fraction": 0.6330390921}
/* eslint-disable padded-blocks */
import { isRequired, tooManyParameters } from '../helpers/helpers'

describe('isRequired', () => {

  it('should throw an error when called', () => {
    let param1 = 'iconName'
    let param2 = 'Icon'
    let errorMessage = `'${param1}' parameter is required for '${param2}' component`

    expect(() => {
      isRequired(param1, param2)
    }).toThrow(errorMessage)
  })

})

describe('tooManyParameters', () => {

  it('should throw an error when called', () => {
    let param1 = 'Icon'
    let param2 = ['isFlippedVertically', 'isFlippedHorizontally']
    let errorMessage = `'${param1}' cannot take more than one of the following parameters: ${param2}`

    expect(() => {
      tooManyParameters(param1, param2)
    }).toThrow(errorMessage)
  })

})
