Welcome to mirror list, hosted at ThFree Co, Russian Federation.

file_row_stats_spec.js « components « diffs « frontend « spec - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3f5a63c19e53f69cc87a0456c3aa6e520a2bb2da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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');
  });
});