Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/javascripts/notebook/cells/code_spec.js')
-rw-r--r--spec/javascripts/notebook/cells/code_spec.js74
1 files changed, 0 insertions, 74 deletions
diff --git a/spec/javascripts/notebook/cells/code_spec.js b/spec/javascripts/notebook/cells/code_spec.js
deleted file mode 100644
index f3f97145ad3..00000000000
--- a/spec/javascripts/notebook/cells/code_spec.js
+++ /dev/null
@@ -1,74 +0,0 @@
-import Vue from 'vue';
-import CodeComponent from '~/notebook/cells/code.vue';
-
-const Component = Vue.extend(CodeComponent);
-
-describe('Code component', () => {
- let vm;
- let json;
-
- beforeEach(() => {
- json = getJSONFixture('blob/notebook/basic.json');
- });
-
- const setupComponent = cell => {
- const comp = new Component({
- propsData: {
- cell,
- },
- });
- comp.$mount();
- return comp;
- };
-
- describe('without output', () => {
- beforeEach(done => {
- vm = setupComponent(json.cells[0]);
-
- setTimeout(() => {
- done();
- });
- });
-
- it('does not render output prompt', () => {
- expect(vm.$el.querySelectorAll('.prompt').length).toBe(1);
- });
- });
-
- describe('with output', () => {
- beforeEach(done => {
- vm = setupComponent(json.cells[2]);
-
- setTimeout(() => {
- done();
- });
- });
-
- it('does not render output prompt', () => {
- expect(vm.$el.querySelectorAll('.prompt').length).toBe(2);
- });
-
- it('renders output cell', () => {
- expect(vm.$el.querySelector('.output')).toBeDefined();
- });
- });
-
- describe('with string for cell.source', () => {
- beforeEach(done => {
- const cell = json.cells[0];
- cell.source = cell.source.join('');
-
- vm = setupComponent(cell);
-
- setTimeout(() => {
- done();
- });
- });
-
- it('renders the same input as when cell.source is an array', () => {
- const expected = "console.log('test')";
-
- expect(vm.$el.querySelector('.input').innerText).toContain(expected);
- });
- });
-});