debian-mirror-gitlab/spec/frontend/diffs/components/file_row_stats_spec.js
2021-03-08 18:12:59 +05:30

21 lines
515 B
JavaScript

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');
});
});