blob: 7d3b60d2ba4e2c97d36dc127efe3638da2e33abb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
import { mount } from '@vue/test-utils';
import FileRowStats from '~/diffs/components/file_row_stats.vue';
describe('Diff file row stats', () => {
let wrapper;
const createComponent = () => {
wrapper = mount(FileRowStats, {
propsData: {
file: {
addedLines: 20,
removedLines: 10,
},
},
});
};
beforeEach(() => {
createComponent();
});
it('renders added lines count', () => {
expect(wrapper.find('.cgreen').text()).toContain('+20');
});
it('renders removed lines count', () => {
expect(wrapper.find('.cred').text()).toContain('-10');
});
});
|