blob: 644d05366a0b492e47d00490a853aa01b0928cc7 (
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
|
import { shallowMount } from '@vue/test-utils';
import DurationBadge from '~/jobs/components/log/duration_badge.vue';
describe('Job Log Duration Badge', () => {
let wrapper;
const data = {
duration: '00:30:01',
};
const createComponent = (props = {}) => {
wrapper = shallowMount(DurationBadge, {
propsData: {
...props,
},
});
};
beforeEach(() => {
createComponent(data);
});
it('renders provided duration', () => {
expect(wrapper.text()).toBe(data.duration);
});
});
|