Commit 52c6702e authored by Mike Greiling's avatar Mike Greiling

include spec_helper within karma config rather than each individual test

parent 05b95e71
...@@ -6,13 +6,14 @@ var ROOT_PATH = path.resolve(__dirname, '..'); ...@@ -6,13 +6,14 @@ var ROOT_PATH = path.resolve(__dirname, '..');
module.exports = function(config) { module.exports = function(config) {
config.set({ config.set({
basePath: ROOT_PATH, basePath: ROOT_PATH,
frameworks: ['jquery-2.1.0', 'jasmine'], frameworks: ['jasmine'],
files: [ files: [
'spec/javascripts/spec_helper.js',
'spec/javascripts/**/*_spec.js?(.es6)', 'spec/javascripts/**/*_spec.js?(.es6)',
{ pattern: 'spec/javascripts/fixtures/**/*@(.json|.html|.html.raw)', included: false }, { pattern: 'spec/javascripts/fixtures/**/*@(.json|.html|.html.raw)', included: false },
], ],
preprocessors: { preprocessors: {
'spec/javascripts/**/*_spec.js?(.es6)': ['webpack'], 'spec/javascripts/**/*.js?(.es6)': ['webpack'],
}, },
webpack: webpackConfig, webpack: webpackConfig,
webpackMiddleware: { stats: 'errors-only' }, webpackMiddleware: { stats: 'errors-only' },
......
require('./spec_helper');
require('lib/utils/text_utility'); require('lib/utils/text_utility');
require('abuse_reports'); require('abuse_reports');
......
/* eslint-disable no-unused-expressions, comma-spacing, prefer-const, no-prototype-builtins, semi, no-new, keyword-spacing, no-plusplus, no-shadow, max-len */ /* eslint-disable no-unused-expressions, comma-spacing, prefer-const, no-prototype-builtins, semi, no-new, keyword-spacing, no-plusplus, no-shadow, max-len */
require('./spec_helper');
window.Cookies = require('vendor/js.cookie'); window.Cookies = require('vendor/js.cookie');
require('vendor/jquery.endless-scroll.js'); require('vendor/jquery.endless-scroll.js');
require('pager'); require('pager');
......
/* eslint-disable space-before-function-paren, no-var, one-var, one-var-declaration-per-line, no-unused-expressions, comma-dangle, new-parens, no-unused-vars, quotes, jasmine/no-spec-dupes, prefer-template, padded-blocks, max-len */ /* eslint-disable space-before-function-paren, no-var, one-var, one-var-declaration-per-line, no-unused-expressions, comma-dangle, new-parens, no-unused-vars, quotes, jasmine/no-spec-dupes, prefer-template, padded-blocks, max-len */
/* global AwardsHandler */ /* global AwardsHandler */
require('./spec_helper');
require('awards_handler'); require('awards_handler');
window.Cookies = require('vendor/js.cookie'); window.Cookies = require('vendor/js.cookie');
require('./fixtures/emoji_menu'); require('./fixtures/emoji_menu');
......
/* eslint-disable space-before-function-paren, no-var, comma-dangle, no-return-assign, padded-blocks, max-len */ /* eslint-disable space-before-function-paren, no-var, comma-dangle, no-return-assign, padded-blocks, max-len */
require('../spec_helper');
require('behaviors/autosize'); require('behaviors/autosize');
(function() { (function() {
......
/* eslint-disable space-before-function-paren, no-var, no-return-assign, comma-dangle, jasmine/no-spec-dupes, new-cap, padded-blocks, max-len */ /* eslint-disable space-before-function-paren, no-var, no-return-assign, comma-dangle, jasmine/no-spec-dupes, new-cap, padded-blocks, max-len */
require('../spec_helper');
require('behaviors/quick_submit'); require('behaviors/quick_submit');
(function() { (function() {
......
/* eslint-disable space-before-function-paren, no-var, padded-blocks */ /* eslint-disable space-before-function-paren, no-var, padded-blocks */
require('../spec_helper');
require('behaviors/requires_input'); require('behaviors/requires_input');
(function() { (function() {
......
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
/* global listObj */ /* global listObj */
/* global listObjDuplicate */ /* global listObjDuplicate */
require('../spec_helper');
require('jquery-ujs'); require('jquery-ujs');
window.Cookies = require('vendor/js.cookie'); window.Cookies = require('vendor/js.cookie');
window.Vue = require('vue'); window.Vue = require('vue');
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
/* global BoardService */ /* global BoardService */
/* global ListIssue */ /* global ListIssue */
require('../spec_helper');
require('jquery-ujs'); require('jquery-ujs');
window.Cookies = require('vendor/js.cookie'); window.Cookies = require('vendor/js.cookie');
window.Vue = require('vue'); window.Vue = require('vue');
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
/* global List */ /* global List */
/* global listObj */ /* global listObj */
require('../spec_helper');
require('jquery-ujs'); require('jquery-ujs');
window.Cookies = require('vendor/js.cookie'); window.Cookies = require('vendor/js.cookie');
window.Vue = require('vue'); window.Vue = require('vue');
......
require('./spec_helper');
require('lib/utils/bootstrap_linked_tabs'); require('lib/utils/bootstrap_linked_tabs');
(() => { (() => {
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
/* global Build */ /* global Build */
/* global Turbolinks */ /* global Turbolinks */
require('./spec_helper');
require('lib/utils/datetime_utility'); require('lib/utils/datetime_utility');
require('build'); require('build');
require('breakpoints'); require('breakpoints');
......
/* eslint-disable no-new, padded-blocks */ /* eslint-disable no-new, padded-blocks */
require('./spec_helper');
require('sidebar'); require('sidebar');
window.Cookies = require('vendor/js.cookie'); window.Cookies = require('vendor/js.cookie');
require('lib/utils/text_utility'); require('lib/utils/text_utility');
......
require('./spec_helper');
require('lib/utils/datetime_utility'); require('lib/utils/datetime_utility');
(() => { (() => {
......
/* eslint-disable no-extra-semi, jasmine/no-global-setup, dot-notation, jasmine/no-expect-in-setup-teardown, max-len */ /* eslint-disable no-extra-semi, jasmine/no-global-setup, dot-notation, jasmine/no-expect-in-setup-teardown, max-len */
/* global CommentsStore */ /* global CommentsStore */
require('./spec_helper');
require('diff_notes/models/discussion'); require('diff_notes/models/discussion');
require('diff_notes/models/note'); require('diff_notes/models/note');
require('diff_notes/stores/comments'); require('diff_notes/stores/comments');
......
require('../spec_helper');
window.Vue = require('vue'); window.Vue = require('vue');
require('environments/components/environment_actions'); require('environments/components/environment_actions');
......
require('../spec_helper');
window.Vue = require('vue'); window.Vue = require('vue');
require('environments/components/environment_external_url'); require('environments/components/environment_external_url');
......
require('../spec_helper');
window.Vue = require('vue'); window.Vue = require('vue');
window.timeago = require('vendor/timeago'); window.timeago = require('vendor/timeago');
require('environments/components/environment_item'); require('environments/components/environment_item');
......
require('../spec_helper');
window.Vue = require('vue'); window.Vue = require('vue');
require('environments/components/environment_rollback'); require('environments/components/environment_rollback');
......
require('../spec_helper');
window.Vue = require('vue'); window.Vue = require('vue');
require('environments/components/environment_stop'); require('environments/components/environment_stop');
......
/* global environmentsList */ /* global environmentsList */
require('../spec_helper');
window.Vue = require('vue'); window.Vue = require('vue');
require('environments/stores/environments_store'); require('environments/stores/environments_store');
require('./mock_data'); require('./mock_data');
......
/* eslint-disable space-before-function-paren, no-var, padded-blocks */ /* eslint-disable space-before-function-paren, no-var, padded-blocks */
require('../spec_helper');
require('extensions/array'); require('extensions/array');
(function() { (function() {
......
require('../spec_helper');
require('extensions/element'); require('extensions/element');
(() => { (() => {
......
/* eslint-disable space-before-function-paren, no-var, padded-blocks */ /* eslint-disable space-before-function-paren, no-var, padded-blocks */
require('../spec_helper');
require('extensions/jquery'); require('extensions/jquery');
(function() { (function() {
......
require('../spec_helper');
require('extensions/object'); require('extensions/object');
describe('Object extensions', () => { describe('Object extensions', () => {
......
/* eslint-disable comma-dangle, prefer-const, no-param-reassign, no-plusplus, semi, no-unused-expressions, arrow-spacing, max-len */ /* eslint-disable comma-dangle, prefer-const, no-param-reassign, no-plusplus, semi, no-unused-expressions, arrow-spacing, max-len */
/* global Turbolinks */ /* global Turbolinks */
require('./spec_helper');
require('gl_dropdown'); require('gl_dropdown');
require('lib/utils/common_utils'); require('lib/utils/common_utils');
require('lib/utils/type_utility'); require('lib/utils/type_utility');
......
/* eslint-disable space-before-function-paren, arrow-body-style, indent, padded-blocks */ /* eslint-disable space-before-function-paren, arrow-body-style, indent, padded-blocks */
require('./spec_helper');
require('gl_field_errors'); require('gl_field_errors');
((global) => { ((global) => {
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
/* global ContributorsGraph */ /* global ContributorsGraph */
/* global ContributorsMasterGraph */ /* global ContributorsMasterGraph */
require('../spec_helper');
require('graphs/stat_graph_contributors_graph'); require('graphs/stat_graph_contributors_graph');
describe("ContributorsGraph", function () { describe("ContributorsGraph", function () {
......
/* eslint-disable quotes, padded-blocks, no-var, camelcase, object-curly-spacing, semi, indent, object-property-newline, comma-dangle, comma-spacing, spaced-comment, max-len, key-spacing, vars-on-top, quote-props, no-multi-spaces */ /* eslint-disable quotes, padded-blocks, no-var, camelcase, object-curly-spacing, semi, indent, object-property-newline, comma-dangle, comma-spacing, spaced-comment, max-len, key-spacing, vars-on-top, quote-props, no-multi-spaces */
/* global ContributorsStatGraphUtil */ /* global ContributorsStatGraphUtil */
require('../spec_helper');
require('graphs/stat_graph_contributors_util'); require('graphs/stat_graph_contributors_util');
describe("ContributorsStatGraphUtil", function () { describe("ContributorsStatGraphUtil", function () {
......
/* eslint-disable quotes, padded-blocks, semi */ /* eslint-disable quotes, padded-blocks, semi */
/* global StatGraph */ /* global StatGraph */
require('../spec_helper');
require('graphs/stat_graph'); require('graphs/stat_graph');
describe("StatGraph", function () { describe("StatGraph", function () {
......
/* eslint-disable space-before-function-paren, padded-blocks, no-var */ /* eslint-disable space-before-function-paren, padded-blocks, no-var */
require('./spec_helper');
require('header'); require('header');
require('lib/utils/text_utility'); require('lib/utils/text_utility');
......
/* global Issuable */ /* global Issuable */
/* global Turbolinks */ /* global Turbolinks */
require('./spec_helper');
require('issuable'); require('issuable');
(() => { (() => {
......
/* eslint-disable space-before-function-paren, no-var, one-var, one-var-declaration-per-line, no-use-before-define, indent, no-trailing-spaces, comma-dangle, padded-blocks, max-len */ /* eslint-disable space-before-function-paren, no-var, one-var, one-var-declaration-per-line, no-use-before-define, indent, no-trailing-spaces, comma-dangle, padded-blocks, max-len */
/* global Issue */ /* global Issue */
require('./spec_helper');
require('lib/utils/text_utility'); require('lib/utils/text_utility');
require('issue'); require('issue');
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
/* global IssuableContext */ /* global IssuableContext */
/* global LabelsSelect */ /* global LabelsSelect */
require('./spec_helper');
require('lib/utils/type_utility'); require('lib/utils/type_utility');
require('gl_dropdown'); require('gl_dropdown');
require('select2'); require('select2');
......
require('../../spec_helper');
require('lib/utils/common_utils'); require('lib/utils/common_utils');
(() => { (() => {
......
/* eslint-disable space-before-function-paren, no-var, no-param-reassign, quotes, prefer-template, no-else-return, new-cap, dot-notation, no-return-assign, comma-dangle, no-new, one-var, one-var-declaration-per-line, no-plusplus, jasmine/no-spec-dupes, no-underscore-dangle, padded-blocks, max-len */ /* eslint-disable space-before-function-paren, no-var, no-param-reassign, quotes, prefer-template, no-else-return, new-cap, dot-notation, no-return-assign, comma-dangle, no-new, one-var, one-var-declaration-per-line, no-plusplus, jasmine/no-spec-dupes, no-underscore-dangle, padded-blocks, max-len */
/* global LineHighlighter */ /* global LineHighlighter */
require('./spec_helper');
require('line_highlighter'); require('line_highlighter');
(function() { (function() {
......
/* eslint-disable space-before-function-paren, no-return-assign, padded-blocks */ /* eslint-disable space-before-function-paren, no-return-assign, padded-blocks */
/* global MergeRequest */ /* global MergeRequest */
require('./spec_helper');
require('merge_request'); require('merge_request');
(function() { (function() {
......
/* eslint-disable no-var, comma-dangle, object-shorthand */ /* eslint-disable no-var, comma-dangle, object-shorthand */
require('./spec_helper');
require('merge_request_tabs'); require('merge_request_tabs');
require('breakpoints'); require('breakpoints');
require('lib/utils/common_utils'); require('lib/utils/common_utils');
......
/* eslint-disable space-before-function-paren, quotes, comma-dangle, dot-notation, indent, quote-props, no-var, padded-blocks, max-len */ /* eslint-disable space-before-function-paren, quotes, comma-dangle, dot-notation, indent, quote-props, no-var, padded-blocks, max-len */
require('./spec_helper');
require('merge_request_widget'); require('merge_request_widget');
require('lib/utils/datetime_utility'); require('lib/utils/datetime_utility');
......
/* eslint-disable no-new */ /* eslint-disable no-new */
require('./spec_helper');
require('flash'); require('flash');
require('mini_pipeline_graph_dropdown'); require('mini_pipeline_graph_dropdown');
......
/* eslint-disable space-before-function-paren, one-var, no-var, one-var-declaration-per-line, no-return-assign, quotes, padded-blocks, max-len */ /* eslint-disable space-before-function-paren, one-var, no-var, one-var-declaration-per-line, no-return-assign, quotes, padded-blocks, max-len */
/* global NewBranchForm */ /* global NewBranchForm */
require('./spec_helper');
require('jquery-ui/ui/autocomplete'); require('jquery-ui/ui/autocomplete');
require('new_branch_form'); require('new_branch_form');
......
/* eslint-disable space-before-function-paren, no-unused-expressions, no-var, object-shorthand, comma-dangle, semi, padded-blocks, max-len */ /* eslint-disable space-before-function-paren, no-unused-expressions, no-var, object-shorthand, comma-dangle, semi, padded-blocks, max-len */
/* global Notes */ /* global Notes */
require('./spec_helper');
require('notes'); require('notes');
require('vendor/autosize'); require('vendor/autosize');
require('gl_form'); require('gl_form');
......
require('./spec_helper');
require('pipelines'); require('pipelines');
(() => { (() => {
......
require('./spec_helper');
require('lib/utils/pretty_time'); require('lib/utils/pretty_time');
(() => { (() => {
......
/* eslint-disable space-before-function-paren, no-unused-expressions, no-return-assign, no-param-reassign, no-var, new-cap, wrap-iife, no-unused-vars, quotes, jasmine/no-expect-in-setup-teardown, padded-blocks, max-len */ /* eslint-disable space-before-function-paren, no-unused-expressions, no-return-assign, no-param-reassign, no-var, new-cap, wrap-iife, no-unused-vars, quotes, jasmine/no-expect-in-setup-teardown, padded-blocks, max-len */
/* global Project */ /* global Project */
require('./spec_helper');
require('select2/select2.js'); require('select2/select2.js');
require('lib/utils/type_utility'); require('lib/utils/type_utility');
require('gl_dropdown'); require('gl_dropdown');
......
/* eslint-disable space-before-function-paren, no-var, one-var, one-var-declaration-per-line, new-parens, no-return-assign, new-cap, vars-on-top, semi, padded-blocks, max-len */ /* eslint-disable space-before-function-paren, no-var, one-var, one-var-declaration-per-line, new-parens, no-return-assign, new-cap, vars-on-top, semi, padded-blocks, max-len */
/* global Sidebar */ /* global Sidebar */
require('./spec_helper');
require('right_sidebar'); require('right_sidebar');
window.Cookies = require('vendor/js.cookie'); window.Cookies = require('vendor/js.cookie');
require('extensions/jquery.js'); require('extensions/jquery.js');
......
/* eslint-disable space-before-function-paren, max-len, no-var, one-var, one-var-declaration-per-line, no-unused-expressions, consistent-return, no-param-reassign, default-case, no-return-assign, comma-dangle, object-shorthand, prefer-template, quotes, new-parens, vars-on-top, new-cap, padded-blocks, max-len */ /* eslint-disable space-before-function-paren, max-len, no-var, one-var, one-var-declaration-per-line, no-unused-expressions, consistent-return, no-param-reassign, default-case, no-return-assign, comma-dangle, object-shorthand, prefer-template, quotes, new-parens, vars-on-top, new-cap, padded-blocks, max-len */
require('./spec_helper');
require('gl_dropdown'); require('gl_dropdown');
require('search_autocomplete'); require('search_autocomplete');
require('lib/utils/common_utils'); require('lib/utils/common_utils');
......
/* eslint-disable space-before-function-paren, no-return-assign, no-var, quotes, padded-blocks */ /* eslint-disable space-before-function-paren, no-return-assign, no-var, quotes, padded-blocks */
/* global ShortcutsIssuable */ /* global ShortcutsIssuable */
require('./spec_helper');
require('shortcuts_issuable'); require('shortcuts_issuable');
(function() { (function() {
......
require('./spec_helper');
require('signin_tabs_memoizer'); require('signin_tabs_memoizer');
((global) => { ((global) => {
......
require('./spec_helper');
require('smart_interval'); require('smart_interval');
(() => { (() => {
......
/* eslint-disable max-len, arrow-parens, comma-dangle, no-plusplus */ /* eslint-disable max-len, arrow-parens, comma-dangle, no-plusplus */
require('./spec_helper');
require('subbable_resource'); require('subbable_resource');
/* /*
......
/* eslint-disable space-before-function-paren, no-var, no-return-assign, quotes, padded-blocks */ /* eslint-disable space-before-function-paren, no-var, no-return-assign, quotes, padded-blocks */
require('./spec_helper');
require('syntax_highlight'); require('syntax_highlight');
(function() { (function() {
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
/* global MockU2FDevice */ /* global MockU2FDevice */
/* global U2FAuthenticate */ /* global U2FAuthenticate */
require('../spec_helper');
require('u2f/authenticate'); require('u2f/authenticate');
require('u2f/util'); require('u2f/util');
require('u2f/error'); require('u2f/error');
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
/* global MockU2FDevice */ /* global MockU2FDevice */
/* global U2FRegister */ /* global U2FRegister */
require('../spec_helper');
require('u2f/register'); require('u2f/register');
require('u2f/util'); require('u2f/util');
require('u2f/error'); require('u2f/error');
......
require('../spec_helper');
require('vue_common_component/commit'); require('vue_common_component/commit');
describe('Commit component', () => { describe('Commit component', () => {
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
/* global Mousetrap */ /* global Mousetrap */
/* global ZenMode */ /* global ZenMode */
require('./spec_helper');
require('zen_mode'); require('zen_mode');
(function() { (function() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment