diff options
author | Matija Čupić <matteeyah@gmail.com> | 2018-05-02 20:50:07 +0300 |
---|---|---|
committer | Matija Čupić <matteeyah@gmail.com> | 2018-05-02 20:50:07 +0300 |
commit | 5c79256b9b9dff7cfe475f135500637e44c417a6 (patch) | |
tree | 6ed41e2bc268d9106fcef192d0eba68f1921a36a /spec/javascripts | |
parent | a6866fbcabaf75494fd14ed106ff249183e98523 (diff) | |
parent | c7c9f38d01938963a8cdf7f5a3bd12ea53e22e59 (diff) |
Merge branch 'master' into 33697-pipelines-json-endpoint
Diffstat (limited to 'spec/javascripts')
-rw-r--r-- | spec/javascripts/test_bundle.js | 12 | ||||
-rw-r--r-- | spec/javascripts/vue_mr_widget/components/states/mr_widget_wip_spec.js | 8 |
2 files changed, 5 insertions, 15 deletions
diff --git a/spec/javascripts/test_bundle.js b/spec/javascripts/test_bundle.js index bcd15f5eae2..2411d33a496 100644 --- a/spec/javascripts/test_bundle.js +++ b/spec/javascripts/test_bundle.js @@ -84,21 +84,11 @@ beforeEach(() => { const axiosDefaultAdapter = getDefaultAdapter(); -let testFiles = process.env.TEST_FILES || []; -if (testFiles.length > 0) { - testFiles = testFiles.map(path => path.replace(/^spec\/javascripts\//, '').replace(/\.js$/, '')); - console.log(`Running only tests matching: ${testFiles}`); -} else { - console.log('Running all tests'); -} - // render all of our tests const testsContext = require.context('.', true, /_spec$/); testsContext.keys().forEach(function(path) { try { - if (testFiles.length === 0 || testFiles.some(p => path.includes(p))) { - testsContext(path); - } + testsContext(path); } catch (err) { console.error('[ERROR] Unable to load spec: ', path); describe('Test bundle', function() { diff --git a/spec/javascripts/vue_mr_widget/components/states/mr_widget_wip_spec.js b/spec/javascripts/vue_mr_widget/components/states/mr_widget_wip_spec.js index 98ab61a0367..cea603368bf 100644 --- a/spec/javascripts/vue_mr_widget/components/states/mr_widget_wip_spec.js +++ b/spec/javascripts/vue_mr_widget/components/states/mr_widget_wip_spec.js @@ -1,9 +1,9 @@ import Vue from 'vue'; -import wipComponent from '~/vue_merge_request_widget/components/states/mr_widget_wip'; +import WorkInProgress from '~/vue_merge_request_widget/components/states/work_in_progress.vue'; import eventHub from '~/vue_merge_request_widget/event_hub'; const createComponent = () => { - const Component = Vue.extend(wipComponent); + const Component = Vue.extend(WorkInProgress); const mr = { title: 'The best MR ever', removeWIPPath: '/path/to/remove/wip', @@ -17,10 +17,10 @@ const createComponent = () => { }); }; -describe('MRWidgetWIP', () => { +describe('Wip', () => { describe('props', () => { it('should have props', () => { - const { mr, service } = wipComponent.props; + const { mr, service } = WorkInProgress.props; expect(mr.type instanceof Object).toBeTruthy(); expect(mr.required).toBeTruthy(); |