{"size": 515, "ext": "js", "max_stars_repo_path": "spec/frontend/diffs/components/file_row_stats_spec.js", "max_stars_repo_name": "Testiduk/gitlabhq", "max_stars_repo_stars_event_min_datetime": "2015-01-01T02:37:54.000Z", "max_stars_repo_stars_event_max_datetime": "2022-03-31T03:33:20.000Z", "max_issues_repo_path": "spec/frontend/diffs/components/file_row_stats_spec.js", "max_issues_repo_name": "Testiduk/gitlabhq", "max_issues_repo_issues_event_min_datetime": "2015-01-01T02:39:54.000Z", "max_issues_repo_issues_event_max_datetime": "2022-01-03T16:58:41.000Z", "max_forks_repo_path": "spec/frontend/diffs/components/file_row_stats_spec.js", "max_forks_repo_name": "Acidburn0zzz/gitlabhq", "max_forks_repo_forks_event_min_datetime": "2015-01-01T09:03:52.000Z", "max_forks_repo_forks_event_max_datetime": "2022-03-31T08:09:05.000Z"}
{"max_stars_count": 11467, "max_issues_count": 2862, "max_forks_count": 4353, "avg_line_length": 23.4090909091, "max_line_length": 65, "alphanum_fraction": 0.5766990291}
import { mount } from '@vue/test-utils';
import FileRowStats from '~/diffs/components/file_row_stats.vue';

describe('Diff file row stats', () => {
  const wrapper = mount(FileRowStats, {
    propsData: {
      file: {
        addedLines: 20,
        removedLines: 10,
      },
    },
  });

  it('renders added lines count', () => {
    expect(wrapper.find('.cgreen').text()).toContain('+20');
  });

  it('renders removed lines count', () => {
    expect(wrapper.find('.cred').text()).toContain('-10');
  });
});
