{"size": 595, "ext": "js", "max_stars_repo_path": "src/functions/__tests__/concat.test.js", "max_stars_repo_name": "kamikazePT/forofa", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/functions/__tests__/concat.test.js", "max_issues_repo_name": "kamikazePT/forofa", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/functions/__tests__/concat.test.js", "max_forks_repo_name": "kamikazePT/forofa", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 22.8846153846, "max_line_length": 65, "alphanum_fraction": 0.5899159664}
import concat from "../concat";

function* fourFiveSix() {
  yield 4;
  yield 5;
  yield 6;
}

describe("concat function", () => {
  it("Concats an array with an array concats both", () => {
    const array = [1, 2, 3];
    const toAdd = [4, 5, 6];

    const concatenated = concat(array, toAdd);

    expect(Array.from(concatenated)).toEqual([1, 2, 3, 4, 5, 6]);
  });

  it("Concats an array with an iterable concats both", () => {
    const array = [1, 2, 3];
    const concatenated = concat(array, fourFiveSix());

    expect(Array.from(concatenated)).toEqual([1, 2, 3, 4, 5, 6]);
  });
});
