{"size": 463, "ext": "js", "max_stars_repo_path": "src/reducers/__TEST__/filterHeroes.test.js", "max_stars_repo_name": "vzdrizhni/Superheroes-catalogue", "max_stars_repo_stars_event_min_datetime": "2020-09-08T08:52:14.000Z", "max_stars_repo_stars_event_max_datetime": "2020-09-19T17:32:27.000Z", "max_issues_repo_path": "src/reducers/__TEST__/filterHeroes.test.js", "max_issues_repo_name": "vzdrizhni/Superheroes-catalogue", "max_issues_repo_issues_event_min_datetime": "2020-09-07T07:29:16.000Z", "max_issues_repo_issues_event_max_datetime": "2020-09-07T07:29:16.000Z", "max_forks_repo_path": "src/reducers/__TEST__/filterHeroes.test.js", "max_forks_repo_name": "vzdrizhni/Superheroes-catalogue", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 2, "max_issues_count": 1, "max_forks_count": null, "avg_line_length": 30.8666666667, "max_line_length": 72, "alphanum_fraction": 0.7062634989}
import filterHeroesReducer from '../filterHeroes.reducer';
import filterHeroes from '../../actions/index';

const reuslt = filterHeroes('Hero');
const state = 'Super';

it('should return val property of filterHeroes function', () => {
  expect(filterHeroesReducer(state, reuslt)).toBe('Hero');
});

it('should return state when the type property is not a FILTER', () => {
  reuslt.type = 'Another';
  expect(filterHeroesReducer(state, reuslt)).toBe('Super');
});
