diff options
author | Phil Hughes <me@iamphill.com> | 2017-04-11 23:25:10 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-04-11 23:25:10 +0300 |
commit | bf5248ac28bf817344a8b1b4feda744a0832d32d (patch) | |
tree | 30bf3bf7d944f81f173c9d3a92db850b66b68556 /spec/javascripts/notebook/cells | |
parent | 310495575db81bf9a3a3afaee6f19a4a2639b8d8 (diff) |
Pull in fixture files from the repo
Diffstat (limited to 'spec/javascripts/notebook/cells')
-rw-r--r-- | spec/javascripts/notebook/cells/code_spec.js | 6 | ||||
-rw-r--r-- | spec/javascripts/notebook/cells/markdown_spec.js | 8 | ||||
-rw-r--r-- | spec/javascripts/notebook/cells/output/index_spec.js | 6 |
3 files changed, 16 insertions, 4 deletions
diff --git a/spec/javascripts/notebook/cells/code_spec.js b/spec/javascripts/notebook/cells/code_spec.js index e1df98b70ba..0c432d73f67 100644 --- a/spec/javascripts/notebook/cells/code_spec.js +++ b/spec/javascripts/notebook/cells/code_spec.js @@ -1,11 +1,15 @@ import Vue from 'vue'; import CodeComponent from '~/notebook/cells/code.vue'; -import json from '../../fixtures/notebook/file.json'; const Component = Vue.extend(CodeComponent); describe('Code component', () => { let vm; + let json; + + beforeEach(() => { + json = getJSONFixture('blob/notebook/basic.json'); + }); describe('without output', () => { beforeEach((done) => { diff --git a/spec/javascripts/notebook/cells/markdown_spec.js b/spec/javascripts/notebook/cells/markdown_spec.js index 5c11272e7e0..38c976f38d8 100644 --- a/spec/javascripts/notebook/cells/markdown_spec.js +++ b/spec/javascripts/notebook/cells/markdown_spec.js @@ -1,14 +1,18 @@ import Vue from 'vue'; import MarkdownComponent from '~/notebook/cells/markdown.vue'; -import json from '../../fixtures/notebook/file.json'; -const cell = json.cells[1]; const Component = Vue.extend(MarkdownComponent); describe('Markdown component', () => { let vm; + let cell; + let json; beforeEach((done) => { + json = getJSONFixture('blob/notebook/basic.json'); + + cell = json.cells[1]; + vm = new Component({ propsData: { cell, diff --git a/spec/javascripts/notebook/cells/output/index_spec.js b/spec/javascripts/notebook/cells/output/index_spec.js index 7fe8d227f05..dbf79f85c7c 100644 --- a/spec/javascripts/notebook/cells/output/index_spec.js +++ b/spec/javascripts/notebook/cells/output/index_spec.js @@ -1,11 +1,11 @@ import Vue from 'vue'; import CodeComponent from '~/notebook/cells/output/index.vue'; -import json from '../../../fixtures/notebook/file.json'; const Component = Vue.extend(CodeComponent); describe('Output component', () => { let vm; + let json; const createComponent = (output) => { vm = new Component({ @@ -17,6 +17,10 @@ describe('Output component', () => { vm.$mount(); }; + beforeEach(() => { + json = getJSONFixture('blob/notebook/basic.json'); + }); + describe('text output', () => { beforeEach((done) => { createComponent(json.cells[2].outputs[0]); |