blob: 0cda0c5bc2b7a51d2931a056c24017d7e35cd217 (
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
30
31
32
33
34
35
36
37
38
39
40
|
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 } });
afterEach(() => {
wrapper.destroy();
});
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');
});
});
});
|