{"size": 350, "ext": "js", "max_stars_repo_path": "arrayAnalysis.test.js", "max_stars_repo_name": "rajkumardas2701/TestingPractice_JS", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "arrayAnalysis.test.js", "max_issues_repo_name": "rajkumardas2701/TestingPractice_JS", "max_issues_repo_issues_event_min_datetime": "2021-01-04T09:10:05.000Z", "max_issues_repo_issues_event_max_datetime": "2021-01-05T21:59:11.000Z", "max_forks_repo_path": "arrayAnalysis.test.js", "max_forks_repo_name": "rajkumardas2701/TestingPractice_JS", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 19.4444444444, "max_line_length": 64, "alphanum_fraction": 0.5457142857}

import arrayAnalysis from './arrayAnalysis';

test('returns average, min, max and length of an array', () => {
  expect(arrayAnalysis([1, 8, 3, 4, 2, 6])).toEqual({
    average: 4,
    length: 6,
    min: 1,
    max: 8,
  });

  expect(arrayAnalysis([1, 8, 3, 4, 2, 6])).not.toEqual({
    average: 4,
    length: 5,
    min: 1,
    max: 8,
  });
});