Commit 66393687 authored by Mike Greiling's avatar Mike Greiling

include common libraries within spec_helper

parent c2bd29ec
...@@ -58,7 +58,7 @@ var config = { ...@@ -58,7 +58,7 @@ var config = {
{ {
test: /\.(js|es6)$/, test: /\.(js|es6)$/,
loader: 'imports-loader', loader: 'imports-loader',
query: '$=jquery,jQuery=jquery,this=>window' query: 'this=>window'
}, },
{ {
test: /\.json$/, test: /\.json$/,
......
...@@ -7,7 +7,6 @@ require('lib/utils/datetime_utility'); ...@@ -7,7 +7,6 @@ require('lib/utils/datetime_utility');
require('build'); require('build');
require('breakpoints'); require('breakpoints');
require('vendor/jquery.nicescroll'); require('vendor/jquery.nicescroll');
require('vendor/turbolinks');
describe('Build', () => { describe('Build', () => {
const BUILD_URL = `${gl.TEST_HOST}/frontend-fixtures/builds-project/builds/1`; const BUILD_URL = `${gl.TEST_HOST}/frontend-fixtures/builds-project/builds/1`;
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
require('./spec_helper'); require('./spec_helper');
require('gl_dropdown'); require('gl_dropdown');
require('vendor/turbolinks');
require('lib/utils/common_utils'); require('lib/utils/common_utils');
require('lib/utils/type_utility'); require('lib/utils/type_utility');
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
require('./spec_helper'); require('./spec_helper');
require('issuable'); require('issuable');
require('turbolinks');
(() => { (() => {
const BASE_URL = '/user/project/issues?scope=all&state=closed'; const BASE_URL = '/user/project/issues?scope=all&state=closed';
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
/* global Notes */ /* global Notes */
require('./spec_helper'); require('./spec_helper');
window._ = require('underscore');
require('notes'); require('notes');
require('vendor/autosize'); require('vendor/autosize');
require('gl_form'); require('gl_form');
......
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
/* global Project */ /* global Project */
require('./spec_helper'); require('./spec_helper');
require('bootstrap/js/dropdown');
require('select2/select2.js'); require('select2/select2.js');
require('lib/utils/type_utility'); require('lib/utils/type_utility');
require('gl_dropdown'); require('gl_dropdown');
......
...@@ -6,8 +6,6 @@ require('search_autocomplete'); ...@@ -6,8 +6,6 @@ require('search_autocomplete');
require('lib/utils/common_utils'); require('lib/utils/common_utils');
require('lib/utils/type_utility'); require('lib/utils/type_utility');
require('vendor/fuzzaldrin-plus'); require('vendor/fuzzaldrin-plus');
require('vendor/turbolinks');
require('vendor/jquery.turbolinks');
(function() { (function() {
var addBodyAttributes, assertLinks, dashboardIssuesPath, dashboardMRsPath, groupIssuesPath, groupMRsPath, groupName, mockDashboardOptions, mockGroupOptions, mockProjectOptions, projectIssuesPath, projectMRsPath, projectName, userId, widget; var addBodyAttributes, assertLinks, dashboardIssuesPath, dashboardMRsPath, groupIssuesPath, groupMRsPath, groupName, mockDashboardOptions, mockGroupOptions, mockProjectOptions, projectIssuesPath, projectMRsPath, projectName, userId, widget;
......
require('jasmine-jquery'); require('jasmine-jquery');
// include common libraries
window.$ = window.jQuery = require('jquery');
window._ = require('underscore');
require('vendor/turbolinks');
require('vendor/jquery.turbolinks');
require('bootstrap/js/affix');
require('bootstrap/js/alert');
require('bootstrap/js/button');
require('bootstrap/js/collapse');
require('bootstrap/js/dropdown');
require('bootstrap/js/modal');
require('bootstrap/js/scrollspy');
require('bootstrap/js/tab');
require('bootstrap/js/transition');
require('bootstrap/js/tooltip');
require('bootstrap/js/popover');
// configure jasmine
jasmine.getFixtures().fixturesPath = 'base/spec/javascripts/fixtures'; jasmine.getFixtures().fixturesPath = 'base/spec/javascripts/fixtures';
jasmine.getJSONFixtures().fixturesPath = 'base/spec/javascripts/fixtures'; jasmine.getJSONFixtures().fixturesPath = 'base/spec/javascripts/fixtures';
// stub expected globals
window.gl = window.gl || {}; window.gl = window.gl || {};
window.gl.TEST_HOST = 'http://test.host'; window.gl.TEST_HOST = 'http://test.host';
window.gon = window.gon || {}; window.gon = window.gon || {};
/* eslint-disable max-len, arrow-parens, comma-dangle, no-plusplus */ /* eslint-disable max-len, arrow-parens, comma-dangle, no-plusplus */
require('./spec_helper'); require('./spec_helper');
window._ = require('underscore');
require('subbable_resource'); require('subbable_resource');
/* /*
......
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