{"size": 515, "ext": "js", "max_stars_repo_path": "basic/src/__test__/basic.test.js", "max_stars_repo_name": "matsu0228/firestore-testing-examples", "max_stars_repo_stars_event_min_datetime": "2020-12-26T07:00:44.000Z", "max_stars_repo_stars_event_max_datetime": "2021-01-21T16:40:54.000Z", "max_issues_repo_path": "basic/src/__test__/basic.test.js", "max_issues_repo_name": "matsu0228/firestore-testing-examples", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "basic/src/__test__/basic.test.js", "max_forks_repo_name": "matsu0228/firestore-testing-examples", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 2, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 32.1875, "max_line_length": 86, "alphanum_fraction": 0.5398058252}
const sum = require("../sum");
const append = require("../append");
describe("index", () => {
  test("sum(): adds 1 + 2 to equal 3", () => {
    const actual = sum(1, 2);
    const expected = 3;
    expect(actual).toBe(expected);
  });
  test("append(): adds [`a`, `b`] + 2 to equal [`a`, `b`, 2]", () => {
    const actual = append(["a", "b"], 2);
    const expected = [`a`, `b`, 2];
    expect(actual).toEqual(expected); // toBe() だと、failする。配列やobjectの比較には toEqual() を利用
    expect(actual).toContain(2);
  });
});
