debian-mirror-gitlab/spec/frontend/notebook/cells/prompt_spec.js
2023-05-27 22:25:52 +05:30

36 lines
835 B
JavaScript

import { shallowMount } from '@vue/test-utils';
import Prompt from '~/notebook/cells/prompt.vue';
describe('Prompt component', () => {
let wrapper;
const mountComponent = ({ type }) => shallowMount(Prompt, { propsData: { type, count: 1 } });
describe('input', () => {
beforeEach(() => {
wrapper = mountComponent({ type: 'In' });
});
it('renders in label', () => {
expect(wrapper.text()).toContain('In');
});
it('renders count', () => {
expect(wrapper.text()).toContain('1');
});
});
describe('output', () => {
beforeEach(() => {
wrapper = mountComponent({ type: 'Out' });
});
it('renders in label', () => {
expect(wrapper.text()).toContain('Out');
});
it('renders count', () => {
expect(wrapper.text()).toContain('1');
});
});
});