Commit 7c47cc94 authored by Luke "Jared" Bennett's avatar Luke "Jared" Bennett Committed by Mike Greiling

Swapped out teaspoon for karma

parent 3eb85697
...@@ -291,7 +291,7 @@ rake db:seed_fu: ...@@ -291,7 +291,7 @@ rake db:seed_fu:
paths: paths:
- log/development.log - log/development.log
teaspoon: karma:
cache: cache:
paths: paths:
- vendor/ruby - vendor/ruby
...@@ -300,9 +300,9 @@ teaspoon: ...@@ -300,9 +300,9 @@ teaspoon:
<<: *use-db <<: *use-db
<<: *dedicated-runner <<: *dedicated-runner
script: script:
- npm install
- npm link istanbul - npm link istanbul
- rake teaspoon - rake webpack:compile
- npm run karma-start
artifacts: artifacts:
name: coverage-javascript name: coverage-javascript
expire_in: 31d expire_in: 31d
...@@ -381,8 +381,6 @@ lint:javascript: ...@@ -381,8 +381,6 @@ lint:javascript:
- node_modules/ - node_modules/
stage: test stage: test
image: "node:7.1" image: "node:7.1"
before_script:
- npm install
script: script:
- npm --silent run eslint - npm --silent run eslint
...@@ -393,8 +391,6 @@ lint:javascript:report: ...@@ -393,8 +391,6 @@ lint:javascript:report:
- node_modules/ - node_modules/
stage: post-test stage: post-test
image: "node:7.1" image: "node:7.1"
before_script:
- npm install
script: script:
- find app/ spec/ -name '*.js' -or -name '*.js.es6' -exec sed --in-place 's|/\* eslint-disable .*\*/||' {} \; # run report over all files - find app/ spec/ -name '*.js' -or -name '*.js.es6' -exec sed --in-place 's|/\* eslint-disable .*\*/||' {} \; # run report over all files
- npm --silent run eslint-report || true # ignore exit code - npm --silent run eslint-report || true # ignore exit code
...@@ -444,7 +440,7 @@ pages: ...@@ -444,7 +440,7 @@ pages:
<<: *dedicated-runner <<: *dedicated-runner
dependencies: dependencies:
- coverage - coverage
- teaspoon - karma
- lint:javascript:report - lint:javascript:report
script: script:
- mv public/ .public/ - mv public/ .public/
......
var path = require('path');
var webpackConfig = require('./webpack.config.js');
var ROOT_PATH = path.resolve(__dirname, '..');
// Karma configuration
module.exports = function(config) {
config.set({
basePath: ROOT_PATH,
frameworks: ['jquery-2.1.0', 'jasmine'],
files: [
'spec/javascripts/*_spec.js',
'spec/javascripts/*_spec.js.es6',
{ pattern: 'spec/javascripts/fixtures/**/*.html', included: false, served: true },
{ pattern: 'spec/javascripts/fixtures/**/*.json', included: false, served: true },
],
preprocessors: {
'spec/javascripts/*_spec.js': ['webpack'],
'spec/javascripts/*_spec.js.es6': ['webpack'],
'app/assets/javascripts/**/*.js': ['webpack'],
'app/assets/javascripts/**/*.js.es6': ['webpack'],
},
webpack: webpackConfig,
webpackMiddleware: { stats: 'errors-only' },
});
};
...@@ -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: 'this=>window' query: '$=jquery,jQuery=jquery,this=>window'
}, },
{ {
test: /\.json$/, test: /\.json$/,
...@@ -87,7 +87,10 @@ var config = { ...@@ -87,7 +87,10 @@ var config = {
'vendor': path.join(ROOT_PATH, 'vendor/assets/javascripts'), 'vendor': path.join(ROOT_PATH, 'vendor/assets/javascripts'),
'vue$': 'vue/dist/vue.js', 'vue$': 'vue/dist/vue.js',
'vue-resource$': 'vue-resource/dist/vue-resource.js' 'vue-resource$': 'vue-resource/dist/vue-resource.js'
} },
root: [
path.join(ROOT_PATH, 'app/assets/javascripts'),
],
} }
} }
......
...@@ -6,7 +6,7 @@ namespace :gitlab do ...@@ -6,7 +6,7 @@ namespace :gitlab do
%W(rake rubocop), %W(rake rubocop),
%W(rake spinach), %W(rake spinach),
%W(rake spec), %W(rake spec),
%W(rake teaspoon) %W(npm run karma-start)
] ]
cmds.each do |cmd| cmds.each do |cmd|
......
...@@ -7,5 +7,5 @@ end ...@@ -7,5 +7,5 @@ end
unless Rails.env.production? unless Rails.env.production?
desc "GitLab | Run all tests on CI with simplecov" desc "GitLab | Run all tests on CI with simplecov"
task test_ci: [:rubocop, :brakeman, :teaspoon, :spinach, :spec] task test_ci: [:rubocop, :brakeman, :'karma-start', :spinach, :spec]
end end
...@@ -4,7 +4,8 @@ ...@@ -4,7 +4,8 @@
"dev-server": "node_modules/.bin/webpack-dev-server --config config/webpack.config.js", "dev-server": "node_modules/.bin/webpack-dev-server --config config/webpack.config.js",
"eslint": "eslint --max-warnings 0 --ext .js,.js.es6 .", "eslint": "eslint --max-warnings 0 --ext .js,.js.es6 .",
"eslint-fix": "npm run eslint -- --fix", "eslint-fix": "npm run eslint -- --fix",
"eslint-report": "npm run eslint -- --format html --output-file ./eslint-report.html" "eslint-report": "npm run eslint -- --format html --output-file ./eslint-report.html",
"karma-start": "karma start config/karma.config.js"
}, },
"dependencies": { "dependencies": {
"babel": "^5.8.38", "babel": "^5.8.38",
...@@ -35,6 +36,11 @@ ...@@ -35,6 +36,11 @@
"eslint-plugin-import": "^2.2.0", "eslint-plugin-import": "^2.2.0",
"eslint-plugin-jasmine": "^2.1.0", "eslint-plugin-jasmine": "^2.1.0",
"istanbul": "^0.4.5", "istanbul": "^0.4.5",
"karma": "^1.3.0" "jasmine-core": "^2.5.2",
"jasmine-jquery": "^2.1.1",
"karma": "^1.3.0",
"karma-jasmine": "^1.1.0",
"karma-jquery": "^0.1.0",
"karma-webpack": "^1.8.0"
} }
} }
/*= require lib/utils/text_utility */ require('./spec_helper');
/*= require abuse_reports */ require('lib/utils/text_utility');
require('abuse_reports');
((global) => { ((global) => {
describe('Abuse Reports', () => { describe('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 js.cookie.js */ require('./spec_helper');
/*= require jquery.endless-scroll.js */ require('vendor/js.cookie.js');
/*= require pager */ require('vendor/jquery.endless-scroll.js');
/*= require activities */ require('pager');
require('activities');
(() => { (() => {
window.gon || (window.gon = {}); window.gon || (window.gon = {});
......
/* 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 awards_handler */ require('./spec_helper');
/*= require jquery */ require('awards_handler');
/*= require js.cookie */ require('vendor/js.cookie');
/*= require ./fixtures/emoji_menu */ require('./fixtures/emoji_menu');
(function() { (function() {
var awardsHandler, lazyAssert, urlRoot; var awardsHandler, lazyAssert, urlRoot;
......
/* 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 behaviors/autosize */ require('behaviors/autosize');
(function() { (function() {
describe('Autosize behavior', function() { describe('Autosize behavior', 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 behaviors/quick_submit */ require('./spec_helper');
require('behaviors/quick_submit');
(function() { (function() {
describe('Quick Submit behavior', function() { describe('Quick Submit behavior', function() {
......
/* eslint-disable space-before-function-paren, no-var, padded-blocks */ /* eslint-disable space-before-function-paren, no-var, padded-blocks */
/*= require behaviors/requires_input */ require('./spec_helper');
require('behaviors/requires_input');
(function() { (function() {
describe('requiresInput', function() { describe('requiresInput', function() {
......
...@@ -6,19 +6,18 @@ ...@@ -6,19 +6,18 @@
/* global listObj */ /* global listObj */
/* global listObjDuplicate */ /* global listObjDuplicate */
//= require jquery require('jquery_ujs');
//= require jquery_ujs require('js.cookie');
//= require js.cookie require('vue');
//= require vue require('vue-resource');
//= require vue-resource require('lib/utils/url_utility');
//= require lib/utils/url_utility require('boards/models/issue');
//= require boards/models/issue require('boards/models/label');
//= require boards/models/label require('boards/models/list');
//= require boards/models/list require('boards/models/user');
//= require boards/models/user require('boards/services/board_service');
//= require boards/services/board_service require('boards/stores/boards_store');
//= require boards/stores/boards_store require('./mock_data');
//= require ./mock_data
describe('Store', () => { describe('Store', () => {
beforeEach(() => { beforeEach(() => {
......
...@@ -2,19 +2,18 @@ ...@@ -2,19 +2,18 @@
/* global BoardService */ /* global BoardService */
/* global ListIssue */ /* global ListIssue */
//= require jquery require('jquery_ujs');
//= require jquery_ujs require('js.cookie');
//= require js.cookie require('vue');
//= require vue require('vue-resource');
//= require vue-resource require('lib/utils/url_utility');
//= require lib/utils/url_utility require('boards/models/issue');
//= require boards/models/issue require('boards/models/label');
//= require boards/models/label require('boards/models/list');
//= require boards/models/list require('boards/models/user');
//= require boards/models/user require('boards/services/board_service');
//= require boards/services/board_service require('boards/stores/boards_store');
//= require boards/stores/boards_store require('./mock_data');
//= require ./mock_data
describe('Issue model', () => { describe('Issue model', () => {
let issue; let issue;
......
...@@ -5,19 +5,18 @@ ...@@ -5,19 +5,18 @@
/* global List */ /* global List */
/* global listObj */ /* global listObj */
//= require jquery require('jquery_ujs');
//= require jquery_ujs require('js.cookie');
//= require js.cookie require('vue');
//= require vue require('vue-resource');
//= require vue-resource require('lib/utils/url_utility');
//= require lib/utils/url_utility require('boards/models/issue');
//= require boards/models/issue require('boards/models/label');
//= require boards/models/label require('boards/models/list');
//= require boards/models/list require('boards/models/user');
//= require boards/models/user require('boards/services/board_service');
//= require boards/services/board_service require('boards/stores/boards_store');
//= require boards/stores/boards_store require('./mock_data');
//= require ./mock_data
describe('List model', () => { describe('List model', () => {
let list; let list;
......
//= require lib/utils/bootstrap_linked_tabs require('./spec_helper');
require('lib/utils/bootstrap_linked_tabs');
(() => { (() => {
describe('Linked Tabs', () => { describe('Linked Tabs', () => {
......
...@@ -2,11 +2,12 @@ ...@@ -2,11 +2,12 @@
/* global Build */ /* global Build */
/* global Turbolinks */ /* global Turbolinks */
//= require lib/utils/datetime_utility require('./spec_helper');
//= require build require('lib/utils/datetime_utility');
//= require breakpoints require('build');
//= require jquery.nicescroll require('breakpoints');
//= require turbolinks 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`;
......
/* eslint-disable no-new, padded-blocks */ /* eslint-disable no-new, padded-blocks */
/*= require sidebar */ require('./spec_helper');
/*= require jquery */ require('sidebar');
/*= require js.cookie */ require('vendor/js.cookie');
/*= require lib/utils/text_utility */ require('lib/utils/text_utility');
((global) => { ((global) => {
describe('Dashboard', () => { describe('Dashboard', () => {
......
//= require lib/utils/datetime_utility require('lib/utils/datetime_utility');
(() => { (() => {
describe('Date time utils', () => { describe('Date time utils', () => {
......
/* 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 vue 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
(() => { (() => {
function createDiscussion(noteId = 1, resolved = true) { function createDiscussion(noteId = 1, resolved = true) {
......
//= require vue require('./spec_helper');
//= require environments/components/environment_actions require('vue');
require('environments/components/environment_actions');
describe('Actions Component', () => { describe('Actions Component', () => {
preloadFixtures('static/environments/element.html.raw'); preloadFixtures('static/environments/element.html.raw');
......
//= require vue require('./spec_helper');
//= require environments/components/environment_external_url require('vue');
require('environments/components/environment_external_url');
describe('External URL Component', () => { describe('External URL Component', () => {
preloadFixtures('static/environments/element.html.raw'); preloadFixtures('static/environments/element.html.raw');
......
//= require vue require('./spec_helper');
//= require timeago require('vue');
//= require environments/components/environment_item require('timeago');
require('environments/components/environment_item');
describe('Environment item', () => { describe('Environment item', () => {
preloadFixtures('static/environments/table.html.raw'); preloadFixtures('static/environments/table.html.raw');
......
//= require vue require('./spec_helper');
//= require environments/components/environment_rollback require('vue');
require('environments/components/environment_rollback');
describe('Rollback Component', () => { describe('Rollback Component', () => {
preloadFixtures('static/environments/element.html.raw'); preloadFixtures('static/environments/element.html.raw');
......
//= require vue require('./spec_helper');
//= require environments/components/environment_stop require('vue');
require('environments/components/environment_stop');
describe('Stop Component', () => { describe('Stop Component', () => {
preloadFixtures('static/environments/element.html.raw'); preloadFixtures('static/environments/element.html.raw');
......
/* global environmentsList */ /* global environmentsList */
//= require vue require('vue');
//= require environments/stores/environments_store require('environments/stores/environments_store');
//= require ./mock_data require('./mock_data');
(() => { (() => {
describe('Store', () => { describe('Store', () => {
......
/* eslint-disable no-unused-vars */ /* eslint-disable no-unused-vars */
const environmentsList = [ const environmentsList = [
{ {
id: 31, id: 31,
......
/* eslint-disable space-before-function-paren, no-var, padded-blocks */ /* eslint-disable space-before-function-paren, no-var, padded-blocks */
/*= require extensions/array */ require('extensions/array');
(function() { (function() {
describe('Array extensions', function() { describe('Array extensions', function() {
......
/*= require extensions/element */ require('extensions/element');
(() => { (() => {
describe('Element extensions', function () { describe('Element extensions', function () {
......
/* eslint-disable space-before-function-paren, no-var, padded-blocks */ /* eslint-disable space-before-function-paren, no-var, padded-blocks */
/*= require extensions/jquery */ require('extensions/jquery');
(function() { (function() {
describe('jQuery extensions', function() { describe('jQuery extensions', function() {
......
/*= require extensions/object */ require('extensions/object');
describe('Object extensions', () => { describe('Object extensions', () => {
describe('assign', () => { describe('assign', () => {
......
/* 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 jquery */ require('./spec_helper');
/*= require gl_dropdown */ require('gl_dropdown');
/*= require turbolinks */ require('vendor/turbolinks');
/*= require lib/utils/common_utils */ require('lib/utils/common_utils');
/*= require lib/utils/type_utility */ require('lib/utils/type_utility');
(() => { (() => {
const NON_SELECTABLE_CLASSES = '.divider, .separator, .dropdown-header, .dropdown-menu-empty-link'; const NON_SELECTABLE_CLASSES = '.divider, .separator, .dropdown-header, .dropdown-menu-empty-link';
......
/* 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 jquery require('./spec_helper');
//= require gl_field_errors require('gl_field_errors');
((global) => { ((global) => {
preloadFixtures('static/gl_field_errors.html.raw'); preloadFixtures('static/gl_field_errors.html.raw');
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
/* global ContributorsGraph */ /* global ContributorsGraph */
/* global ContributorsMasterGraph */ /* global ContributorsMasterGraph */
//= require graphs/stat_graph_contributors_graph require('graphs/stat_graph_contributors_graph');
describe("ContributorsGraph", function () { describe("ContributorsGraph", function () {
describe("#set_x_domain", function () { describe("#set_x_domain", 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 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 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 header */ require('./spec_helper');
/*= require lib/utils/text_utility */ require('header');
/*= require jquery */ require('lib/utils/text_utility');
(function() { (function() {
......
/* global Issuable */ /* global Issuable */
/* global Turbolinks */ /* global Turbolinks */
//= require issuable require('issuable');
//= require turbolinks require('turbolinks');
(() => { (() => {
const BASE_URL = '/user/project/issues?scope=all&state=closed'; const BASE_URL = '/user/project/issues?scope=all&state=closed';
......
/* 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 lib/utils/text_utility */ require('./spec_helper');
/*= require issue */ require('lib/utils/text_utility');
require('issue');
(function() { (function() {
var INVALID_URL = 'http://goesnowhere.nothing/whereami'; var INVALID_URL = 'http://goesnowhere.nothing/whereami';
......
...@@ -2,17 +2,16 @@ ...@@ -2,17 +2,16 @@
/* global IssuableContext */ /* global IssuableContext */
/* global LabelsSelect */ /* global LabelsSelect */
//= require lib/utils/type_utility require('./spec_helper');
//= require jquery require('lib/utils/type_utility');
//= require bootstrap require('gl_dropdown');
//= require gl_dropdown require('select2');
//= require select2 require('vendor/jquery.nicescroll');
//= require jquery.nicescroll require('api');
//= require api require('create_label');
//= require create_label require('issuable_context');
//= require issuable_context require('users_select');
//= require users_select require('labels_select');
//= require labels_select
(() => { (() => {
let saveLabelCount = 0; let saveLabelCount = 0;
......
//= require lib/utils/common_utils require('lib/utils/common_utils');
(() => { (() => {
describe('common_utils', () => { describe('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 line_highlighter */ require('./spec_helper');
require('line_highlighter');
(function() { (function() {
describe('LineHighlighter', function() { describe('LineHighlighter', 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 merge_request */ require('./spec_helper');
require('merge_request');
(function() { (function() {
describe('MergeRequest', function() { describe('MergeRequest', function() {
......
/* eslint-disable no-var, comma-dangle, object-shorthand */ /* eslint-disable no-var, comma-dangle, object-shorthand */
/*= require merge_request_tabs */ require('./spec_helper');
//= require breakpoints require('merge_request_tabs');
//= require lib/utils/common_utils require('breakpoints');
//= require jquery.scrollTo require('lib/utils/common_utils');
require('vendor/jquery.scrollTo');
(function () { (function () {
describe('MergeRequestTabs', function () { describe('MergeRequestTabs', function () {
......
/* 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 merge_request_widget */ require('merge_request_widget');
/*= require lib/utils/datetime_utility */ require('lib/utils/datetime_utility');
(function() { (function() {
describe('MergeRequestWidget', function() { describe('MergeRequestWidget', function() {
......
/* eslint-disable no-new */ /* eslint-disable no-new */
//= require flash require('flash');
//= require mini_pipeline_graph_dropdown require('mini_pipeline_graph_dropdown');
(() => { (() => {
describe('Mini Pipeline Graph Dropdown', () => { describe('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 jquery-ui/autocomplete */ require('./spec_helper');
/*= require new_branch_form */ require('jquery-ui/ui/autocomplete');
require('new_branch_form');
(function() { (function() {
describe('Branch', function() { describe('Branch', function() {
......
/* 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 notes */ window._ = require('underscore');
/*= require autosize */ require('notes');
/*= require gl_form */ require('vendor/autosize');
/*= require lib/utils/text_utility */ require('gl_form');
require('lib/utils/text_utility');
(function() { (function() {
window.gon || (window.gon = {}); window.gon || (window.gon = {});
......
//= require pipelines require('pipelines');
(() => { (() => {
describe('Pipelines', () => { describe('Pipelines', () => {
......
//= require lib/utils/pretty_time require('lib/utils/pretty_time');
(() => { (() => {
const PrettyTime = gl.PrettyTime; const PrettyTime = gl.PrettyTime;
......
/* 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 bootstrap */ require('./spec_helper');
/*= require select2 */ require('bootstrap/js/dropdown');
/*= require lib/utils/type_utility */ require('select2/select2.js');
/*= require gl_dropdown */ require('lib/utils/type_utility');
/*= require api */ require('gl_dropdown');
/*= require project_select */ require('api');
/*= require project */ require('project_select');
require('project');
(function() { (function() {
window.gon || (window.gon = {}); window.gon || (window.gon = {});
......
/* 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 right_sidebar */ require('./spec_helper');
/*= require jquery */ require('right_sidebar');
/*= require js.cookie */ require('vendor/js.cookie');
require('extensions/jquery.js');
/*= require extensions/jquery.js */
(function() { (function() {
var $aside, $icon, $labelsIcon, $page, $toggle, assertSidebarState; var $aside, $icon, $labelsIcon, $page, $toggle, assertSidebarState;
......
/* 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 jquery */ 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 fuzzaldrin-plus */ require('vendor/turbolinks');
/*= require turbolinks */ require('vendor/jquery.turbolinks');
/*= require 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;
......
/* 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 shortcuts_issuable */ require('./spec_helper');
require('shortcuts_issuable');
(function() { (function() {
describe('ShortcutsIssuable', function() { describe('ShortcutsIssuable', function() {
......
/*= require signin_tabs_memoizer */ require('./spec_helper');
require('signin_tabs_memoizer');
((global) => { ((global) => {
describe('SigninTabsMemoizer', () => { describe('SigninTabsMemoizer', () => {
......
//= require jquery require('./spec_helper');
//= require smart_interval require('smart_interval');
(() => { (() => {
const DEFAULT_MAX_INTERVAL = 100; const DEFAULT_MAX_INTERVAL = 100;
......
/* eslint-disable space-before-function-paren */ require('jasmine-jquery');
// PhantomJS (Teaspoons default driver) doesn't have support for
// Function.prototype.bind, which has caused confusion. Use this polyfill to
// avoid the confusion.
/*= require support/bind-poly */
// You can require your own javascript files here. By default this will include jasmine.getFixtures().fixturesPath = 'base/spec/javascripts/fixtures';
// everything in application, however you may get better load performance if you jasmine.getJSONFixtures().fixturesPath = 'base/spec/javascripts/fixtures';
// require the specific files that are being used in the spec that tests them.
/*= require jquery */
/*= require jquery.turbolinks */
/*= require bootstrap */
/*= require underscore */
// Teaspoon includes some support files, but you can use anything from your own
// support path too.
// require support/jasmine-jquery-1.7.0
// require support/jasmine-jquery-2.0.0
/*= require support/jasmine-jquery-2.1.0 */
// require support/sinon
// require support/your-support-file
// Deferring execution
// If you're using CommonJS, RequireJS or some other asynchronous library you can
// defer execution. Call Teaspoon.execute() after everything has been loaded.
// Simple example of a timeout:
// Teaspoon.defer = true
// setTimeout(Teaspoon.execute, 1000)
// Matching files
// By default Teaspoon will look for files that match
// _spec.{js,js.es6}. Add a filename_spec.js file in your spec path
// and it'll be included in the default suite automatically. If you want to
// customize suites, check out the configuration in teaspoon_env.rb
// Manifest
// If you'd rather require your spec files manually (to control order for
// instance) you can disable the suite matcher in the configuration and use this
// file as a manifest.
// For more information: http://github.com/modeset/teaspoon
// set our fixtures path
jasmine.getFixtures().fixturesPath = '/teaspoon/fixtures';
jasmine.getJSONFixtures().fixturesPath = '/teaspoon/fixtures';
// defined in ActionDispatch::TestRequest
// see https://github.com/rails/rails/blob/v4.2.7.1/actionpack/lib/action_dispatch/testing/test_request.rb#L7
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 */
//= vue require('./spec_helper');
//= vue-resource window._ = require('underscore');
//= require jquery require('subbable_resource');
//= require subbable_resource
/* /*
* Test that each rest verb calls the publish and subscribe function and passes the correct value back * Test that each rest verb calls the publish and subscribe function and passes the correct value back
......
/* 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 syntax_highlight */ require('./spec_helper');
require('syntax_highlight');
(function() { (function() {
describe('Syntax Highlighter', function() { describe('Syntax Highlighter', function() {
......
...@@ -2,11 +2,12 @@ ...@@ -2,11 +2,12 @@
/* global MockU2FDevice */ /* global MockU2FDevice */
/* global U2FAuthenticate */ /* global U2FAuthenticate */
/*= require u2f/authenticate */ require('./spec_helper');
/*= require u2f/util */ require('u2f/authenticate');
/*= require u2f/error */ require('u2f/util');
/*= require u2f */ require('u2f/error');
/*= require ./mock_u2f_device */ require('vendor/u2f');
require('./mock_u2f_device');
(function() { (function() {
describe('U2FAuthenticate', function() { describe('U2FAuthenticate', function() {
......
...@@ -2,11 +2,12 @@ ...@@ -2,11 +2,12 @@
/* global MockU2FDevice */ /* global MockU2FDevice */
/* global U2FRegister */ /* global U2FRegister */
/*= require u2f/register */ require('./spec_helper');
/*= require u2f/util */ require('u2f/register');
/*= require u2f/error */ require('u2f/util');
/*= require u2f */ require('u2f/error');
/*= require ./mock_u2f_device */ require('vendor/u2f');
require('./mock_u2f_device');
(function() { (function() {
describe('U2FRegister', function() { describe('U2FRegister', function() {
......
//= require vue_common_component/commit require('./spec_helper');
require('vue_common_component/commit');
describe('Commit component', () => { describe('Commit component', () => {
let props; let props;
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
/* global Mousetrap */ /* global Mousetrap */
/* global ZenMode */ /* global ZenMode */
/*= require zen_mode */ require('./spec_helper');
require('zen_mode');
(function() { (function() {
var enterZen, escapeKeydown, exitZen; var enterZen, escapeKeydown, exitZen;
......
...@@ -8,10 +8,23 @@ The MIT License ...@@ -8,10 +8,23 @@ The MIT License
Copyright (c) 2012-2013 Sasha Koss & Rico Sta. Cruz Copyright (c) 2012-2013 Sasha Koss & Rico Sta. Cruz
*/ */
(function() { (function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module unless amdModuleId is set
define(["jquery"], function (a0) {
return (factory(a0));
});
} else if (typeof exports === 'object') {
// Node. Does not work with strict CommonJS, but
// only CommonJS-like environments that support module.exports,
// like Node.
module.exports = factory(require("jquery"));
} else {
factory(jQuery);
}
}(this, function($) {
var $, $document; var $, $document;
$ = $ || window.jQuery || (typeof require === "function" ? require('jquery') : void 0);
$ = window.jQuery || (typeof require === "function" ? require('jquery') : void 0);
$document = $(document); $document = $(document);
...@@ -46,4 +59,4 @@ Copyright (c) 2012-2013 Sasha Koss & Rico Sta. Cruz ...@@ -46,4 +59,4 @@ Copyright (c) 2012-2013 Sasha Koss & Rico Sta. Cruz
$.turbo.use('page:load', 'page:fetch'); $.turbo.use('page:load', 'page:fetch');
}).call(this); }));
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