{"size": 477, "ext": "js", "max_stars_repo_path": "src/selectors/selectors.test.js", "max_stars_repo_name": "wghglory/react-redux-employee", "max_stars_repo_stars_event_min_datetime": "2017-11-01T12:21:27.000Z", "max_stars_repo_stars_event_max_datetime": "2017-11-01T12:21:27.000Z", "max_issues_repo_path": "src/selectors/selectors.test.js", "max_issues_repo_name": "wghglory/react-redux-employee", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/selectors/selectors.test.js", "max_forks_repo_name": "wghglory/react-redux-employee", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 31.8, "max_line_length": 81, "alphanum_fraction": 0.6184486373}
import expect from 'expect';
import { departmentsFormattedForDropdown } from './selectors';

describe('Department Selectors', () => {
  describe('departmentsFormattedForDropdown', () => {
    it('下拉列表输出文字格式化', () => {
      const departments = [{ id: 1, name: 'Wang' }, { id: 2, name: 'Peter' }];

      const expected = [{ value: 1, text: 'Wang' }, { value: 2, text: 'Peter' }];

      expect(departmentsFormattedForDropdown(departments)).toEqual(expected);
    });
  });
});
