gitlab-org--gitlab-foss/spec/javascripts/notebook/cells/prompt_spec.js
Phil Hughes 4755f6066b Moved NotebookLab assets into repo
Moved all the notebooklab assets into the GitLab repo
2017-04-11 18:50:21 +01:00

56 lines
1.1 KiB
JavaScript

import Vue from 'vue';
import PromptComponent from '~/notebook/cells/prompt.vue';
const Component = Vue.extend(PromptComponent);
describe('Prompt component', () => {
let vm;
describe('input', () => {
beforeEach((done) => {
vm = new Component({
propsData: {
type: 'In',
count: 1,
},
});
vm.$mount();
setTimeout(() => {
done();
});
});
it('renders in label', () => {
expect(vm.$el.textContent.trim()).toContain('In');
});
it('renders count', () => {
expect(vm.$el.textContent.trim()).toContain('1');
});
});
describe('output', () => {
beforeEach((done) => {
vm = new Component({
propsData: {
type: 'Out',
count: 1,
},
});
vm.$mount();
setTimeout(() => {
done();
});
});
it('renders in label', () => {
expect(vm.$el.textContent.trim()).toContain('Out');
});
it('renders count', () => {
expect(vm.$el.textContent.trim()).toContain('1');
});
});
});