BigW Consortium Gitlab

Commit 7c47cc94 by Luke "Jared" Bennett Committed by Mike Greiling

Swapped out teaspoon for karma

parent 3eb85697
......@@ -291,7 +291,7 @@ rake db:seed_fu:
paths:
- log/development.log
teaspoon:
karma:
cache:
paths:
- vendor/ruby
......@@ -300,9 +300,9 @@ teaspoon:
<<: *use-db
<<: *dedicated-runner
script:
- npm install
- npm link istanbul
- rake teaspoon
- rake webpack:compile
- npm run karma-start
artifacts:
name: coverage-javascript
expire_in: 31d
......@@ -381,8 +381,6 @@ lint:javascript:
- node_modules/
stage: test
image: "node:7.1"
before_script:
- npm install
script:
- npm --silent run eslint
......@@ -393,8 +391,6 @@ lint:javascript:report:
- node_modules/
stage: post-test
image: "node:7.1"
before_script:
- npm install
script:
- 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
......@@ -444,7 +440,7 @@ pages:
<<: *dedicated-runner
dependencies:
- coverage
- teaspoon
- karma
- lint:javascript:report
script:
- 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 = {
{
test: /\.(js|es6)$/,
loader: 'imports-loader',
query: 'this=>window'
query: '$=jquery,jQuery=jquery,this=>window'
},
{
test: /\.json$/,
......@@ -87,7 +87,10 @@ var config = {
'vendor': path.join(ROOT_PATH, 'vendor/assets/javascripts'),
'vue$': 'vue/dist/vue.js',
'vue-resource$': 'vue-resource/dist/vue-resource.js'
}
},
root: [
path.join(ROOT_PATH, 'app/assets/javascripts'),
],
}
}
......
......@@ -6,7 +6,7 @@ namespace :gitlab do
%W(rake rubocop),
%W(rake spinach),
%W(rake spec),
%W(rake teaspoon)
%W(npm run karma-start)
]
cmds.each do |cmd|
......
......@@ -7,5 +7,5 @@ end
unless Rails.env.production?
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
......@@ -4,7 +4,8 @@
"dev-server": "node_modules/.bin/webpack-dev-server --config config/webpack.config.js",
"eslint": "eslint --max-warnings 0 --ext .js,.js.es6 .",
"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": {
"babel": "^5.8.38",
......@@ -35,6 +36,11 @@
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-jasmine": "^2.1.0",
"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 abuse_reports */
require('./spec_helper');
require('lib/utils/text_utility');
require('abuse_reports');
((global) => {
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 */
/*= require js.cookie.js */
/*= require jquery.endless-scroll.js */
/*= require pager */
/*= require activities */
require('./spec_helper');
require('vendor/js.cookie.js');
require('vendor/jquery.endless-scroll.js');
require('pager');
require('activities');
(() => {
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 */
/* global AwardsHandler */
/*= require awards_handler */
/*= require jquery */
/*= require js.cookie */
/*= require ./fixtures/emoji_menu */
require('./spec_helper');
require('awards_handler');
require('vendor/js.cookie');
require('./fixtures/emoji_menu');
(function() {
var awardsHandler, lazyAssert, urlRoot;
......
/* eslint-disable space-before-function-paren, no-var, comma-dangle, no-return-assign, padded-blocks, max-len */
/*= require behaviors/autosize */
require('behaviors/autosize');
(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 */
/*= require behaviors/quick_submit */
require('./spec_helper');
require('behaviors/quick_submit');
(function() {
describe('Quick Submit behavior', function() {
......
/* eslint-disable space-before-function-paren, no-var, padded-blocks */
/*= require behaviors/requires_input */
require('./spec_helper');
require('behaviors/requires_input');
(function() {
describe('requiresInput', function() {
......
......@@ -6,19 +6,18 @@
/* global listObj */
/* global listObjDuplicate */
//= require jquery
//= require jquery_ujs
//= require js.cookie
//= require vue
//= require vue-resource
//= require lib/utils/url_utility
//= require boards/models/issue
//= require boards/models/label
//= require boards/models/list
//= require boards/models/user
//= require boards/services/board_service
//= require boards/stores/boards_store
//= require ./mock_data
require('jquery_ujs');
require('js.cookie');
require('vue');
require('vue-resource');
require('lib/utils/url_utility');
require('boards/models/issue');
require('boards/models/label');
require('boards/models/list');
require('boards/models/user');
require('boards/services/board_service');
require('boards/stores/boards_store');
require('./mock_data');
describe('Store', () => {
beforeEach(() => {
......
......@@ -2,19 +2,18 @@
/* global BoardService */
/* global ListIssue */
//= require jquery
//= require jquery_ujs
//= require js.cookie
//= require vue
//= require vue-resource
//= require lib/utils/url_utility
//= require boards/models/issue
//= require boards/models/label
//= require boards/models/list
//= require boards/models/user
//= require boards/services/board_service
//= require boards/stores/boards_store
//= require ./mock_data
require('jquery_ujs');
require('js.cookie');
require('vue');
require('vue-resource');
require('lib/utils/url_utility');
require('boards/models/issue');
require('boards/models/label');
require('boards/models/list');
require('boards/models/user');
require('boards/services/board_service');
require('boards/stores/boards_store');
require('./mock_data');
describe('Issue model', () => {
let issue;
......
......@@ -5,19 +5,18 @@
/* global List */
/* global listObj */
//= require jquery
//= require jquery_ujs
//= require js.cookie
//= require vue
//= require vue-resource
//= require lib/utils/url_utility
//= require boards/models/issue
//= require boards/models/label
//= require boards/models/list
//= require boards/models/user
//= require boards/services/board_service
//= require boards/stores/boards_store
//= require ./mock_data
require('jquery_ujs');
require('js.cookie');
require('vue');
require('vue-resource');
require('lib/utils/url_utility');
require('boards/models/issue');
require('boards/models/label');
require('boards/models/list');
require('boards/models/user');
require('boards/services/board_service');
require('boards/stores/boards_store');
require('./mock_data');
describe('List model', () => {
let list;
......
//= require lib/utils/bootstrap_linked_tabs
require('./spec_helper');
require('lib/utils/bootstrap_linked_tabs');
(() => {
describe('Linked Tabs', () => {
......
......@@ -2,11 +2,12 @@
/* global Build */
/* global Turbolinks */
//= require lib/utils/datetime_utility
//= require build
//= require breakpoints
//= require jquery.nicescroll
//= require turbolinks
require('./spec_helper');
require('lib/utils/datetime_utility');
require('build');
require('breakpoints');
require('vendor/jquery.nicescroll');
require('vendor/turbolinks');
describe('Build', () => {
const BUILD_URL = `${gl.TEST_HOST}/frontend-fixtures/builds-project/builds/1`;
......
/* eslint-disable no-new, padded-blocks */
/*= require sidebar */
/*= require jquery */
/*= require js.cookie */
/*= require lib/utils/text_utility */
require('./spec_helper');
require('sidebar');
require('vendor/js.cookie');
require('lib/utils/text_utility');
((global) => {
describe('Dashboard', () => {
......
//= require lib/utils/datetime_utility
require('lib/utils/datetime_utility');
(() => {
describe('Date time utils', () => {
......
/* eslint-disable no-extra-semi, jasmine/no-global-setup, dot-notation, jasmine/no-expect-in-setup-teardown, max-len */
/* global CommentsStore */
//= require vue
//= require diff_notes/models/discussion
//= require diff_notes/models/note
//= require diff_notes/stores/comments
require('diff_notes/models/discussion');
require('diff_notes/models/note');
require('diff_notes/stores/comments');
(() => {
function createDiscussion(noteId = 1, resolved = true) {
......
//= require vue
//= require environments/components/environment_actions
require('./spec_helper');
require('vue');
require('environments/components/environment_actions');
describe('Actions Component', () => {
preloadFixtures('static/environments/element.html.raw');
......
//= require vue
//= require environments/components/environment_external_url
require('./spec_helper');
require('vue');
require('environments/components/environment_external_url');
describe('External URL Component', () => {
preloadFixtures('static/environments/element.html.raw');
......
//= require vue
//= require timeago
//= require environments/components/environment_item
require('./spec_helper');
require('vue');
require('timeago');
require('environments/components/environment_item');
describe('Environment item', () => {
preloadFixtures('static/environments/table.html.raw');
......
//= require vue
//= require environments/components/environment_rollback
require('./spec_helper');
require('vue');
require('environments/components/environment_rollback');
describe('Rollback Component', () => {
preloadFixtures('static/environments/element.html.raw');
......
//= require vue
//= require environments/components/environment_stop
require('./spec_helper');
require('vue');
require('environments/components/environment_stop');
describe('Stop Component', () => {
preloadFixtures('static/environments/element.html.raw');
......
/* global environmentsList */
//= require vue
//= require environments/stores/environments_store
//= require ./mock_data
require('vue');
require('environments/stores/environments_store');
require('./mock_data');
(() => {
describe('Store', () => {
......
/* eslint-disable no-unused-vars */
const environmentsList = [
{
id: 31,
......
/* eslint-disable space-before-function-paren, no-var, padded-blocks */
/*= require extensions/array */
require('extensions/array');
(function() {
describe('Array extensions', function() {
......
/*= require extensions/element */
require('extensions/element');
(() => {
describe('Element extensions', function () {
......
/* eslint-disable space-before-function-paren, no-var, padded-blocks */
/*= require extensions/jquery */
require('extensions/jquery');
(function() {
describe('jQuery extensions', function() {
......
/*= require extensions/object */
require('extensions/object');
describe('Object extensions', () => {
describe('assign', () => {
......
/* eslint-disable comma-dangle, prefer-const, no-param-reassign, no-plusplus, semi, no-unused-expressions, arrow-spacing, max-len */
/* global Turbolinks */
/*= require jquery */
/*= require gl_dropdown */
/*= require turbolinks */
/*= require lib/utils/common_utils */
/*= require lib/utils/type_utility */
require('./spec_helper');
require('gl_dropdown');
require('vendor/turbolinks');
require('lib/utils/common_utils');
require('lib/utils/type_utility');
(() => {
const NON_SELECTABLE_CLASSES = '.divider, .separator, .dropdown-header, .dropdown-menu-empty-link';
......
/* eslint-disable space-before-function-paren, arrow-body-style, indent, padded-blocks */
//= require jquery
//= require gl_field_errors
require('./spec_helper');
require('gl_field_errors');
((global) => {
preloadFixtures('static/gl_field_errors.html.raw');
......
......@@ -3,7 +3,7 @@
/* global ContributorsGraph */
/* global ContributorsMasterGraph */
//= require graphs/stat_graph_contributors_graph
require('graphs/stat_graph_contributors_graph');
describe("ContributorsGraph", 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 */
/* global ContributorsStatGraphUtil */
//= require graphs/stat_graph_contributors_util
require('graphs/stat_graph_contributors_util');
describe("ContributorsStatGraphUtil", function () {
......
/* eslint-disable quotes, padded-blocks, semi */
/* global StatGraph */
//= require graphs/stat_graph
require('graphs/stat_graph');
describe("StatGraph", function () {
......
/* eslint-disable space-before-function-paren, padded-blocks, no-var */
/*= require header */
/*= require lib/utils/text_utility */
/*= require jquery */
require('./spec_helper');
require('header');
require('lib/utils/text_utility');
(function() {
......
/* global Issuable */
/* global Turbolinks */
//= require issuable
//= require turbolinks
require('issuable');
require('turbolinks');
(() => {
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 */
/* global Issue */
/*= require lib/utils/text_utility */
/*= require issue */
require('./spec_helper');
require('lib/utils/text_utility');
require('issue');
(function() {
var INVALID_URL = 'http://goesnowhere.nothing/whereami';
......
......@@ -2,17 +2,16 @@
/* global IssuableContext */
/* global LabelsSelect */
//= require lib/utils/type_utility
//= require jquery
//= require bootstrap
//= require gl_dropdown
//= require select2
//= require jquery.nicescroll
//= require api
//= require create_label
//= require issuable_context
//= require users_select
//= require labels_select
require('./spec_helper');
require('lib/utils/type_utility');
require('gl_dropdown');
require('select2');
require('vendor/jquery.nicescroll');
require('api');
require('create_label');
require('issuable_context');
require('users_select');
require('labels_select');
(() => {
let saveLabelCount = 0;
......
//= require lib/utils/common_utils
require('lib/utils/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 */
/* global LineHighlighter */
/*= require line_highlighter */
require('./spec_helper');
require('line_highlighter');
(function() {
describe('LineHighlighter', function() {
......
/* eslint-disable space-before-function-paren, no-return-assign, padded-blocks */
/* global MergeRequest */
/*= require merge_request */
require('./spec_helper');
require('merge_request');
(function() {
describe('MergeRequest', function() {
......
/* eslint-disable no-var, comma-dangle, object-shorthand */
/*= require merge_request_tabs */
//= require breakpoints
//= require lib/utils/common_utils
//= require jquery.scrollTo
require('./spec_helper');
require('merge_request_tabs');
require('breakpoints');
require('lib/utils/common_utils');
require('vendor/jquery.scrollTo');
(function () {
describe('MergeRequestTabs', function () {
......
/* 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 lib/utils/datetime_utility */
require('merge_request_widget');
require('lib/utils/datetime_utility');
(function() {
describe('MergeRequestWidget', function() {
......
/* eslint-disable no-new */
//= require flash
//= require mini_pipeline_graph_dropdown
require('flash');
require('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 */
/* global NewBranchForm */
/*= require jquery-ui/autocomplete */
/*= require new_branch_form */
require('./spec_helper');
require('jquery-ui/ui/autocomplete');
require('new_branch_form');
(function() {
describe('Branch', function() {
......
/* eslint-disable space-before-function-paren, no-unused-expressions, no-var, object-shorthand, comma-dangle, semi, padded-blocks, max-len */
/* global Notes */
/*= require notes */
/*= require autosize */
/*= require gl_form */
/*= require lib/utils/text_utility */
window._ = require('underscore');
require('notes');
require('vendor/autosize');
require('gl_form');
require('lib/utils/text_utility');
(function() {
window.gon || (window.gon = {});
......
//= require pipelines
require('pipelines');
(() => {
describe('Pipelines', () => {
......
//= require lib/utils/pretty_time
require('lib/utils/pretty_time');
(() => {
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 */
/* global Project */
/*= require bootstrap */
/*= require select2 */
/*= require lib/utils/type_utility */
/*= require gl_dropdown */
/*= require api */
/*= require project_select */
/*= require project */
require('./spec_helper');
require('bootstrap/js/dropdown');
require('select2/select2.js');
require('lib/utils/type_utility');
require('gl_dropdown');
require('api');
require('project_select');
require('project');
(function() {
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 */
/* global Sidebar */
/*= require right_sidebar */
/*= require jquery */
/*= require js.cookie */
/*= require extensions/jquery.js */
require('./spec_helper');
require('right_sidebar');
require('vendor/js.cookie');
require('extensions/jquery.js');
(function() {
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 */
/*= require gl_dropdown */
/*= require search_autocomplete */
/*= require jquery */
/*= require lib/utils/common_utils */
/*= require lib/utils/type_utility */
/*= require fuzzaldrin-plus */
/*= require turbolinks */
/*= require jquery.turbolinks */
require('./spec_helper');
require('gl_dropdown');
require('search_autocomplete');
require('lib/utils/common_utils');
require('lib/utils/type_utility');
require('vendor/fuzzaldrin-plus');
require('vendor/turbolinks');
require('vendor/jquery.turbolinks');
(function() {
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 */
/* global ShortcutsIssuable */
/*= require shortcuts_issuable */
require('./spec_helper');
require('shortcuts_issuable');
(function() {
describe('ShortcutsIssuable', function() {
......
/*= require signin_tabs_memoizer */
require('./spec_helper');
require('signin_tabs_memoizer');
((global) => {
describe('SigninTabsMemoizer', () => {
......
//= require jquery
//= require smart_interval
require('./spec_helper');
require('smart_interval');
(() => {
const DEFAULT_MAX_INTERVAL = 100;
......
/* eslint-disable space-before-function-paren */
// 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 */
require('jasmine-jquery');
// You can require your own javascript files here. By default this will include
// everything in application, however you may get better load performance if you
// require the specific files that are being used in the spec that tests them.
/*= require jquery */
/*= require jquery.turbolinks */
/*= require bootstrap */
/*= require underscore */
jasmine.getFixtures().fixturesPath = 'base/spec/javascripts/fixtures';
jasmine.getJSONFixtures().fixturesPath = 'base/spec/javascripts/fixtures';
// 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.TEST_HOST = 'http://test.host';
window.gon = window.gon || {};
/* eslint-disable max-len, arrow-parens, comma-dangle, no-plusplus */
//= vue
//= vue-resource
//= require jquery
//= require subbable_resource
require('./spec_helper');
window._ = require('underscore');
require('subbable_resource');
/*
* 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 */
/*= require syntax_highlight */
require('./spec_helper');
require('syntax_highlight');
(function() {
describe('Syntax Highlighter', function() {
......
......@@ -2,11 +2,12 @@
/* global MockU2FDevice */
/* global U2FAuthenticate */
/*= require u2f/authenticate */
/*= require u2f/util */
/*= require u2f/error */
/*= require u2f */
/*= require ./mock_u2f_device */
require('./spec_helper');
require('u2f/authenticate');
require('u2f/util');
require('u2f/error');
require('vendor/u2f');
require('./mock_u2f_device');
(function() {
describe('U2FAuthenticate', function() {
......
......@@ -2,11 +2,12 @@
/* global MockU2FDevice */
/* global U2FRegister */
/*= require u2f/register */
/*= require u2f/util */
/*= require u2f/error */
/*= require u2f */
/*= require ./mock_u2f_device */
require('./spec_helper');
require('u2f/register');
require('u2f/util');
require('u2f/error');
require('vendor/u2f');
require('./mock_u2f_device');
(function() {
describe('U2FRegister', function() {
......
//= require vue_common_component/commit
require('./spec_helper');
require('vue_common_component/commit');
describe('Commit component', () => {
let props;
......
......@@ -3,7 +3,8 @@
/* global Mousetrap */
/* global ZenMode */
/*= require zen_mode */
require('./spec_helper');
require('zen_mode');
(function() {
var enterZen, escapeKeydown, exitZen;
......
......@@ -8,10 +8,23 @@ The MIT License
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;
$ = window.jQuery || (typeof require === "function" ? require('jquery') : void 0);
$ = $ || window.jQuery || (typeof require === "function" ? require('jquery') : void 0);
$document = $(document);
......@@ -46,4 +59,4 @@ Copyright (c) 2012-2013 Sasha Koss & Rico Sta. Cruz
$.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