{"size": 511, "ext": "js", "max_stars_repo_path": "leetcode/src/30days-challenge/week1/group-anagrams/index.spec.js", "max_stars_repo_name": "begoat/embrace-algorithm", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "leetcode/src/30days-challenge/week1/group-anagrams/index.spec.js", "max_issues_repo_name": "begoat/embrace-algorithm", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "leetcode/src/30days-challenge/week1/group-anagrams/index.spec.js", "max_forks_repo_name": "begoat/embrace-algorithm", "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": 18.25, "max_line_length": 63, "alphanum_fraction": 0.4970645793}
import { assert } from 'chai';

import { groupAnagrams } from './index';

const testcase = [
  [
    ['eat', 'tea', 'tan', 'ate', 'nat', 'bat'],
    [
      ['ate', 'eat', 'tea'],
      ['nat', 'tan'],
      ['bat']
    ]
  ],
];

describe('groupAnagrams', function() {
  it ('always true', () => {
    assert.equal(true, true);
  });

  testcase.map(t => {
    const [param, result] = t;
    return it(param.toString(), () => {
      assert.equal(groupAnagrams(param).length, result.length);
    });
  });
});
