2017-01-07 00:19:42 +00:00
|
|
|
// enable test fixtures
|
2016-12-29 21:42:48 +00:00
|
|
|
require('jasmine-jquery');
|
2016-07-24 20:45:11 +00:00
|
|
|
|
2017-01-07 00:19:42 +00:00
|
|
|
jasmine.getFixtures().fixturesPath = 'base/spec/javascripts/fixtures';
|
|
|
|
jasmine.getJSONFixtures().fixturesPath = 'base/spec/javascripts/fixtures';
|
|
|
|
|
2017-01-06 21:44:03 +00:00
|
|
|
// include common libraries
|
|
|
|
window.$ = window.jQuery = require('jquery');
|
|
|
|
window._ = require('underscore');
|
2017-01-06 23:30:54 +00:00
|
|
|
window.Cookies = require('vendor/js.cookie');
|
|
|
|
window.Vue = require('vue');
|
|
|
|
window.Vue.use(require('vue-resource'));
|
|
|
|
require('jquery-ujs');
|
2017-01-06 21:44:03 +00:00
|
|
|
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');
|
|
|
|
|
|
|
|
// stub expected globals
|
2016-11-19 21:59:32 +00:00
|
|
|
window.gl = window.gl || {};
|
2016-12-31 00:14:33 +00:00
|
|
|
window.gl.TEST_HOST = 'http://test.host';
|
|
|
|
window.gon = window.gon || {};
|
2017-01-07 00:19:42 +00:00
|
|
|
|
|
|
|
// render all of our tests
|
|
|
|
const testsContext = require.context('.', true, /_spec$/);
|
|
|
|
testsContext.keys().forEach(function (path) {
|
|
|
|
try {
|
|
|
|
testsContext(path);
|
|
|
|
} catch (err) {
|
|
|
|
console.error('[ERROR] WITH SPEC FILE: ', path);
|
|
|
|
console.error(err);
|
|
|
|
}
|
|
|
|
});
|