{"size": 845, "ext": "js", "max_stars_repo_path": "Practice/6kyu/Delete occurrences of an element if it occurs more than n times/test.js", "max_stars_repo_name": "side-projects-42/INTERVIEW-PREP-COMPLETE", "max_stars_repo_stars_event_min_datetime": "2021-03-11T00:25:22.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-19T00:19:23.000Z", "max_issues_repo_path": "Practice/6kyu/Delete occurrences of an element if it occurs more than n times/test.js", "max_issues_repo_name": "side-projects-42/INTERVIEW-PREP-COMPLETE", "max_issues_repo_issues_event_min_datetime": "2021-04-26T19:04:15.000Z", "max_issues_repo_issues_event_max_datetime": "2022-03-26T20:18:37.000Z", "max_forks_repo_path": "Practice/6kyu/Delete occurrences of an element if it occurs more than n times/test.js", "max_forks_repo_name": "side-projects-42/INTERVIEW-PREP-COMPLETE", "max_forks_repo_forks_event_min_datetime": "2021-04-26T19:43:01.000Z", "max_forks_repo_forks_event_max_datetime": "2022-01-31T08:36:29.000Z"}
{"max_stars_count": 13, "max_issues_count": 160, "max_forks_count": 12, "avg_line_length": 24.8529411765, "max_line_length": 79, "alphanum_fraction": 0.5621301775}
import { deleteNth } from '.'

test('Delete occurrences of an element if it occurs more than n times', () => {
  expect(deleteNth([1, 1, 1, 1], 2)).toEqual([1, 1])
})

test('Delete occurrences of an element if it occurs more than n times', () => {
  expect(deleteNth([20, 37, 20, 21], 1)).toEqual([20, 37, 21])
})

test('Delete occurrences of an element if it occurs more than n times', () => {
  expect(deleteNth([1, 2, 3, 1, 1, 2, 1, 2, 3, 3, 2, 4, 5, 3, 1], 3)).toEqual([
    1,
    2,
    3,
    1,
    1,
    2,
    2,
    3,
    3,
    4,
    5,
  ])
})

test('Delete occurrences of an element if it occurs more than n times', () => {
  expect(deleteNth([1, 1, 1, 1, 1], 5)).toEqual([1, 1, 1, 1, 1])
})

test('Delete occurrences of an element if it occurs more than n times', () => {
  expect(deleteNth([1, 1, 1, 1, 1], 0)).toEqual([])
})
