BigW Consortium Gitlab

Commit e7b5945c by Mike Greiling

resolve all semi and no-extra-semi eslint violations

parent 9e4d0491
/* eslint-disable space-before-function-paren, comma-dangle, semi */ /* eslint-disable space-before-function-paren, comma-dangle */
/* global Vue */ /* global Vue */
/* global ListLabel */ /* global ListLabel */
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
new ListLabel({ title: 'To Do', color: '#F0AD4E' }), new ListLabel({ title: 'To Do', color: '#F0AD4E' }),
new ListLabel({ title: 'Doing', color: '#5CB85C' }) new ListLabel({ title: 'Doing', color: '#5CB85C' })
] ]
} };
}, },
methods: { methods: {
addDefaultLists () { addDefaultLists () {
......
/* eslint-disable no-unused-vars, no-mixed-operators, prefer-const, comma-dangle, semi */ /* eslint-disable no-unused-vars, no-mixed-operators, prefer-const, comma-dangle */
/* global DocumentTouch */ /* global DocumentTouch */
((w) => { ((w) => {
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
scrollSpeed: 20, scrollSpeed: 20,
onStart: gl.issueBoards.onStart, onStart: gl.issueBoards.onStart,
onEnd: gl.issueBoards.onEnd onEnd: gl.issueBoards.onEnd
} };
Object.keys(obj).forEach((key) => { defaultSortOptions[key] = obj[key]; }); Object.keys(obj).forEach((key) => { defaultSortOptions[key] = obj[key]; });
return defaultSortOptions; return defaultSortOptions;
......
/* eslint-disable space-before-function-paren, comma-dangle, no-param-reassign, camelcase, prefer-const, no-extra-semi, max-len, no-unused-vars */ /* eslint-disable space-before-function-paren, comma-dangle, no-param-reassign, camelcase, prefer-const, max-len, no-unused-vars */
/* global Vue */ /* global Vue */
class BoardService { class BoardService {
......
/* eslint-disable comma-dangle, space-before-function-paren, one-var, indent, space-in-parens, no-shadow, radix, dot-notation, semi, max-len */ /* eslint-disable comma-dangle, space-before-function-paren, one-var, indent, space-in-parens, no-shadow, radix, dot-notation, max-len */
/* global Cookies */ /* global Cookies */
/* global List */ /* global List */
...@@ -105,7 +105,7 @@ ...@@ -105,7 +105,7 @@
if (listTo.type === 'done' && listFrom.type !== 'backlog') { if (listTo.type === 'done' && listFrom.type !== 'backlog') {
issueLists.forEach((list) => { issueLists.forEach((list) => {
list.removeIssue(issue); list.removeIssue(issue);
}) });
issue.removeLabels(listLabels); issue.removeLabels(listLabels);
} else { } else {
listFrom.removeIssue(issue); listFrom.removeIssue(issue);
......
/* eslint-disable func-names, space-before-function-paren, no-var, space-before-blocks, prefer-rest-params, wrap-iife, no-use-before-define, no-param-reassign, quotes, yoda, no-else-return, consistent-return, comma-dangle, semi, object-shorthand, prefer-template, one-var, one-var-declaration-per-line, no-unused-vars, max-len, vars-on-top, padded-blocks */ /* eslint-disable func-names, space-before-function-paren, no-var, space-before-blocks, prefer-rest-params, wrap-iife, no-use-before-define, no-param-reassign, quotes, yoda, no-else-return, consistent-return, comma-dangle, object-shorthand, prefer-template, one-var, one-var-declaration-per-line, no-unused-vars, max-len, vars-on-top, padded-blocks */
/* global Breakpoints */ /* global Breakpoints */
/* global Turbolinks */ /* global Turbolinks */
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
this.$sidebar = $('.js-build-sidebar'); this.$sidebar = $('.js-build-sidebar');
this.sidebarTranslationLimits = { this.sidebarTranslationLimits = {
min: $('.navbar-gitlab').outerHeight() + $('.layout-nav').outerHeight() min: $('.navbar-gitlab').outerHeight() + $('.layout-nav').outerHeight()
} };
this.sidebarTranslationLimits.max = this.sidebarTranslationLimits.min + $('.scrolling-tabs-container').outerHeight(); this.sidebarTranslationLimits.max = this.sidebarTranslationLimits.min + $('.scrolling-tabs-container').outerHeight();
this.$sidebar.css({ this.$sidebar.css({
top: this.sidebarTranslationLimits.max top: this.sidebarTranslationLimits.max
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
}; };
Build.prototype.getInitialBuildTrace = function() { Build.prototype.getInitialBuildTrace = function() {
var removeRefreshStatuses = ['success', 'failed', 'canceled', 'skipped'] var removeRefreshStatuses = ['success', 'failed', 'canceled', 'skipped'];
return $.ajax({ return $.ajax({
url: this.buildUrl, url: this.buildUrl,
...@@ -153,7 +153,7 @@ ...@@ -153,7 +153,7 @@
this.$scrollTopBtn.hide(); this.$scrollTopBtn.hide();
this.$scrollBottomBtn.hide(); this.$scrollBottomBtn.hide();
this.$autoScrollContainer.hide(); this.$autoScrollContainer.hide();
} };
// Page scroll listener to detect if user has scrolling page // Page scroll listener to detect if user has scrolling page
// and handle following cases // and handle following cases
......
/* eslint-disable comma-dangle, object-shorthand, func-names, no-else-return, quotes, no-lonely-if, semi, max-len */ /* eslint-disable comma-dangle, object-shorthand, func-names, no-else-return, quotes, no-lonely-if, max-len */
/* global Vue */ /* global Vue */
/* global CommentsStore */ /* global CommentsStore */
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
data() { data() {
return { return {
textareaIsEmpty: true textareaIsEmpty: true
} };
}, },
computed: { computed: {
discussion: function () { discussion: function () {
......
/* eslint-disable comma-dangle, object-shorthand, func-names, no-else-return, guard-for-in, no-restricted-syntax, one-var, indent, space-before-function-paren, no-lonely-if, no-continue, brace-style, max-len, quotes, semi */ /* eslint-disable comma-dangle, object-shorthand, func-names, no-else-return, guard-for-in, no-restricted-syntax, one-var, indent, space-before-function-paren, no-lonely-if, no-continue, brace-style, max-len, quotes */
/* global Vue */ /* global Vue */
/* global DiscussionMixins */ /* global DiscussionMixins */
/* global CommentsStore */ /* global CommentsStore */
...@@ -156,7 +156,7 @@ ...@@ -156,7 +156,7 @@
// If the next discussion is closed, toggle it open. // If the next discussion is closed, toggle it open.
if ($target.find('.js-toggle-content').is(':hidden')) { if ($target.find('.js-toggle-content').is(':hidden')) {
$target.find('.js-toggle-button i').trigger('click') $target.find('.js-toggle-button i').trigger('click');
} }
} else if (activeTab === 'diffs') { } else if (activeTab === 'diffs') {
// Resolved discussions are hidden in the diffs tab by default. // Resolved discussions are hidden in the diffs tab by default.
......
/* eslint-disable class-methods-use-this, one-var, indent, camelcase, no-new, comma-dangle, semi, no-param-reassign, max-len */ /* eslint-disable class-methods-use-this, one-var, indent, camelcase, no-new, comma-dangle, no-param-reassign, max-len */
/* global Vue */ /* global Vue */
/* global Flash */ /* global Flash */
/* global CommentsStore */ /* global CommentsStore */
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
} else { } else {
new Flash('An error occurred when trying to resolve a discussion. Please try again.', 'alert'); new Flash('An error occurred when trying to resolve a discussion. Please try again.', 'alert');
} }
}) });
} }
resolveAll(projectPath, mergeRequestId, discussionId) { resolveAll(projectPath, mergeRequestId, discussionId) {
......
/* eslint-disable wrap-iife, func-names, space-before-function-paren, comma-dangle, prefer-template, consistent-return, class-methods-use-this, arrow-body-style, prefer-const, padded-blocks, no-unused-vars, no-underscore-dangle, no-new, max-len, semi, no-sequences, no-unused-expressions, no-param-reassign */ /* eslint-disable wrap-iife, func-names, space-before-function-paren, comma-dangle, prefer-template, consistent-return, class-methods-use-this, arrow-body-style, prefer-const, padded-blocks, no-unused-vars, no-underscore-dangle, no-new, max-len, no-sequences, no-unused-expressions, no-param-reassign */
(function(global) { (function(global) {
class DueDateSelect { class DueDateSelect {
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
this.$sidebarValue = $('.js-due-date-sidebar-value', $block); this.$sidebarValue = $('.js-due-date-sidebar-value', $block);
this.fieldName = $dropdown.data('field-name'), this.fieldName = $dropdown.data('field-name'),
this.abilityName = $dropdown.data('ability-name'), this.abilityName = $dropdown.data('ability-name'),
this.issueUpdateURL = $dropdown.data('issue-update') this.issueUpdateURL = $dropdown.data('issue-update');
this.rawSelectedDate = null; this.rawSelectedDate = null;
this.displayedDate = null; this.displayedDate = null;
......
/* eslint-disable no-extend-native, func-names, space-before-function-paren, semi, space-infix-ops, max-len */ /* eslint-disable no-extend-native, func-names, space-before-function-paren, space-infix-ops, max-len */
Array.prototype.first = function() { Array.prototype.first = function() {
return this[0]; return this[0];
} };
Array.prototype.last = function() { Array.prototype.last = function() {
return this[this.length-1]; return this[this.length-1];
} };
Array.prototype.find = Array.prototype.find || function(predicate, ...args) { Array.prototype.find = Array.prototype.find || function(predicate, ...args) {
if (!this) throw new TypeError('Array.prototype.find called on null or undefined'); if (!this) throw new TypeError('Array.prototype.find called on null or undefined');
......
/* eslint-disable func-names, space-before-function-paren, no-template-curly-in-string, comma-dangle, object-shorthand, quotes, dot-notation, no-else-return, one-var, no-var, no-underscore-dangle, one-var-declaration-per-line, no-param-reassign, no-useless-escape, prefer-template, consistent-return, wrap-iife, prefer-arrow-callback, camelcase, no-unused-vars, no-useless-return, padded-blocks, vars-on-top, indent, no-extra-semi, no-multi-spaces, semi, max-len */ /* eslint-disable func-names, space-before-function-paren, no-template-curly-in-string, comma-dangle, object-shorthand, quotes, dot-notation, no-else-return, one-var, no-var, no-underscore-dangle, one-var-declaration-per-line, no-param-reassign, no-useless-escape, prefer-template, consistent-return, wrap-iife, prefer-arrow-callback, camelcase, no-unused-vars, no-useless-return, padded-blocks, vars-on-top, indent, no-multi-spaces, max-len */
// Creates the variables for setting up GFM auto-completion // Creates the variables for setting up GFM auto-completion
(function() { (function() {
...@@ -334,7 +334,7 @@ ...@@ -334,7 +334,7 @@
}); });
}, },
matcher: function(flag, subtext, should_startWithSpace, acceptSpaceBar) { matcher: function(flag, subtext, should_startWithSpace, acceptSpaceBar) {
var regexp = /(?:^|\n)\/([A-Za-z_]*)$/gi var regexp = /(?:^|\n)\/([A-Za-z_]*)$/gi;
var match = regexp.exec(subtext); var match = regexp.exec(subtext);
if (match) { if (match) {
return match[1]; return match[1];
......
/* eslint-disable func-names, space-before-function-paren, no-var, one-var, one-var-declaration-per-line, space-before-blocks, prefer-rest-params, max-len, vars-on-top, wrap-iife, no-unused-vars, quotes, no-shadow, no-cond-assign, prefer-arrow-callback, semi, no-return-assign, no-else-return, camelcase, comma-dangle, no-lonely-if, guard-for-in, no-restricted-syntax, consistent-return, padded-blocks, prefer-template, no-param-reassign, no-loop-func, no-extra-semi, keyword-spacing, no-mixed-operators */ /* eslint-disable func-names, space-before-function-paren, no-var, one-var, one-var-declaration-per-line, space-before-blocks, prefer-rest-params, max-len, vars-on-top, wrap-iife, no-unused-vars, quotes, no-shadow, no-cond-assign, prefer-arrow-callback, no-return-assign, no-else-return, camelcase, comma-dangle, no-lonely-if, guard-for-in, no-restricted-syntax, consistent-return, padded-blocks, prefer-template, no-param-reassign, no-loop-func, keyword-spacing, no-mixed-operators */
/* global fuzzaldrinPlus */ /* global fuzzaldrinPlus */
/* global Turbolinks */ /* global Turbolinks */
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
.on('keydown', function (e) { .on('keydown', function (e) {
var keyCode = e.which; var keyCode = e.which;
if (keyCode === 13 && !options.elIsInput) { if (keyCode === 13 && !options.elIsInput) {
e.preventDefault() e.preventDefault();
} }
}) })
.on('input', function() { .on('input', function() {
...@@ -206,7 +206,7 @@ ...@@ -206,7 +206,7 @@
SELECTABLE_CLASSES = ".dropdown-content li:not(" + NON_SELECTABLE_CLASSES + ", .option-hidden)"; SELECTABLE_CLASSES = ".dropdown-content li:not(" + NON_SELECTABLE_CLASSES + ", .option-hidden)";
CURSOR_SELECT_SCROLL_PADDING = 5 CURSOR_SELECT_SCROLL_PADDING = 5;
FILTER_INPUT = '.dropdown-input .dropdown-input-field'; FILTER_INPUT = '.dropdown-input .dropdown-input-field';
...@@ -223,7 +223,7 @@ ...@@ -223,7 +223,7 @@
this.dropdown = selector != null ? $(selector) : $(this.el).parent(); this.dropdown = selector != null ? $(selector) : $(this.el).parent();
// Set Defaults // Set Defaults
this.filterInput = this.options.filterInput || this.getElement(FILTER_INPUT); this.filterInput = this.options.filterInput || this.getElement(FILTER_INPUT);
this.highlight = !!this.options.highlight this.highlight = !!this.options.highlight;
this.filterInputBlur = this.options.filterInputBlur != null this.filterInputBlur = this.options.filterInputBlur != null
? this.options.filterInputBlur ? this.options.filterInputBlur
: true; : true;
...@@ -550,7 +550,7 @@ ...@@ -550,7 +550,7 @@
value = this.options.id ? this.options.id(data) : data.id; value = this.options.id ? this.options.id(data) : data.id;
fieldName = this.options.fieldName; fieldName = this.options.fieldName;
if (value) { value = value.toString().replace(/'/g, '\\\'') }; if (value) { value = value.toString().replace(/'/g, '\\\''); }
field = this.dropdown.parent().find("input[name='" + fieldName + "'][value='" + value + "']"); field = this.dropdown.parent().find("input[name='" + fieldName + "'][value='" + value + "']");
if (field.length) { if (field.length) {
...@@ -695,8 +695,8 @@ ...@@ -695,8 +695,8 @@
}; };
GitLabDropdown.prototype.focusTextInput = function() { GitLabDropdown.prototype.focusTextInput = function() {
if (this.options.filterable) { this.filterInput.focus() } if (this.options.filterable) { this.filterInput.focus(); }
} };
GitLabDropdown.prototype.addInput = function(fieldName, value, selectedObject) { GitLabDropdown.prototype.addInput = function(fieldName, value, selectedObject) {
var $input; var $input;
...@@ -802,7 +802,7 @@ ...@@ -802,7 +802,7 @@
listItemBottom = listItemTop + listItemHeight; listItemBottom = listItemTop + listItemHeight;
if (!index) { if (!index) {
// Scroll the dropdown content to the top // Scroll the dropdown content to the top
$dropdownContent.scrollTop(0) $dropdownContent.scrollTop(0);
} else if (index === ($listItems.length - 1)) { } else if (index === ($listItems.length - 1)) {
// Scroll the dropdown content to the bottom // Scroll the dropdown content to the bottom
$dropdownContent.scrollTop($dropdownContent.prop('scrollHeight')); $dropdownContent.scrollTop($dropdownContent.prop('scrollHeight'));
......
/* eslint-disable no-useless-return, func-names, space-before-function-paren, wrap-iife, no-var, no-underscore-dangle, prefer-arrow-callback, max-len, one-var, no-unused-vars, one-var-declaration-per-line, prefer-template, no-new, consistent-return, object-shorthand, comma-dangle, no-shadow, no-param-reassign, brace-style, vars-on-top, quotes, no-lonely-if, no-else-return, semi, dot-notation, no-empty, no-return-assign, camelcase, prefer-spread, padded-blocks */ /* eslint-disable no-useless-return, func-names, space-before-function-paren, wrap-iife, no-var, no-underscore-dangle, prefer-arrow-callback, max-len, one-var, no-unused-vars, one-var-declaration-per-line, prefer-template, no-new, consistent-return, object-shorthand, comma-dangle, no-shadow, no-param-reassign, brace-style, vars-on-top, quotes, no-lonely-if, no-else-return, dot-notation, no-empty, no-return-assign, camelcase, prefer-spread, padded-blocks */
/* global Issuable */ /* global Issuable */
/* global ListLabel */ /* global ListLabel */
...@@ -333,7 +333,7 @@ ...@@ -333,7 +333,7 @@
if ($dropdown.parent().find('.is-active:not(.dropdown-clear-active)').length) { if ($dropdown.parent().find('.is-active:not(.dropdown-clear-active)').length) {
$dropdown.parent() $dropdown.parent()
.find('.dropdown-clear-active') .find('.dropdown-clear-active')
.removeClass('is-active') .removeClass('is-active');
} }
if ($dropdown.hasClass('js-filter-bulk-update') || $dropdown.hasClass('js-issuable-form-dropdown')) { if ($dropdown.hasClass('js-filter-bulk-update') || $dropdown.hasClass('js-issuable-form-dropdown')) {
......
/* eslint-disable func-names, space-before-function-paren, wrap-iife, no-var, no-param-reassign, no-cond-assign, quotes, semi, one-var, one-var-declaration-per-line, operator-assignment, no-else-return, prefer-template, prefer-arrow-callback, no-empty, max-len, consistent-return, no-unused-vars, no-return-assign, padded-blocks, max-len */ /* eslint-disable func-names, space-before-function-paren, wrap-iife, no-var, no-param-reassign, no-cond-assign, quotes, one-var, one-var-declaration-per-line, operator-assignment, no-else-return, prefer-template, prefer-arrow-callback, no-empty, max-len, consistent-return, no-unused-vars, no-return-assign, padded-blocks, max-len */
(function() { (function() {
(function(w) { (function(w) {
var base; var base;
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
} }
gl.text.addDelimiter = function(text) { gl.text.addDelimiter = function(text) {
return text ? text.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") : text; return text ? text.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",") : text;
} };
gl.text.randomString = function() { gl.text.randomString = function() {
return Math.random().toString(36).substring(7); return Math.random().toString(36).substring(7);
}; };
...@@ -159,7 +159,7 @@ ...@@ -159,7 +159,7 @@
}; };
gl.text.humanize = function(string) { gl.text.humanize = function(string) {
return string.charAt(0).toUpperCase() + string.replace(/_/g, ' ').slice(1); return string.charAt(0).toUpperCase() + string.replace(/_/g, ' ').slice(1);
} };
return gl.text.truncate = function(string, maxLength) { return gl.text.truncate = function(string, maxLength) {
return string.substr(0, (maxLength - 3)) + '...'; return string.substr(0, (maxLength - 3)) + '...';
}; };
......
/* eslint-disable comma-dangle, quote-props, no-useless-computed-key, object-shorthand, prefer-const, no-new, padded-blocks, no-param-reassign, semi, max-len */ /* eslint-disable comma-dangle, quote-props, no-useless-computed-key, object-shorthand, prefer-const, no-new, padded-blocks, no-param-reassign, max-len */
/* global Vue */ /* global Vue */
/* global ace */ /* global ace */
/* global Flash */ /* global Flash */
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
loading: false, loading: false,
fileLoaded: false, fileLoaded: false,
originalContent: '', originalContent: '',
} };
}, },
computed: { computed: {
classObject() { classObject() {
......
/* eslint-disable no-param-reassign, comma-dangle, no-extra-semi, padded-blocks */ /* eslint-disable no-param-reassign, comma-dangle, padded-blocks */
((global) => { ((global) => {
global.mergeConflicts = global.mergeConflicts || {}; global.mergeConflicts = global.mergeConflicts || {};
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
method: 'POST' method: 'POST'
}); });
} }
}; }
global.mergeConflicts.mergeConflictsService = mergeConflictsService; global.mergeConflicts.mergeConflictsService = mergeConflictsService;
......
/* eslint-disable comma-dangle, object-shorthand, no-dupe-keys, no-param-reassign, camelcase, prefer-const, no-nested-ternary, no-continue, semi, func-call-spacing, no-spaced-func, padded-blocks, max-len */ /* eslint-disable comma-dangle, object-shorthand, no-dupe-keys, no-param-reassign, camelcase, prefer-const, no-nested-ternary, no-continue, func-call-spacing, no-spaced-func, padded-blocks, max-len */
/* global Cookies */ /* global Cookies */
/* global Vue */ /* global Vue */
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
this.decorateLineForInlineView(line, id, conflict); this.decorateLineForInlineView(line, id, conflict);
file.inlineLines.push(line); file.inlineLines.push(line);
}) });
if (conflict) { if (conflict) {
file.inlineLines.push(this.getOriginHeaderLine(id)); file.inlineLines.push(this.getOriginHeaderLine(id));
...@@ -321,7 +321,7 @@ ...@@ -321,7 +321,7 @@
if (file.resolveMode === INTERACTIVE_RESOLVE_MODE) { if (file.resolveMode === INTERACTIVE_RESOLVE_MODE) {
let numberConflicts = 0; let numberConflicts = 0;
let resolvedConflicts = Object.keys(file.resolutionData).length let resolvedConflicts = Object.keys(file.resolutionData).length;
// We only check for conflicts type 'text' // We only check for conflicts type 'text'
// since conflicts `text_editor` can´t be resolved in interactive mode // since conflicts `text_editor` can´t be resolved in interactive mode
......
/* eslint-disable new-cap, comma-dangle, no-new, semi */ /* eslint-disable new-cap, comma-dangle, no-new */
/* global Vue */ /* global Vue */
/* global Flash */ /* global Flash */
...@@ -29,10 +29,10 @@ $(() => { ...@@ -29,10 +29,10 @@ $(() => {
'parallel-conflict-lines': gl.mergeConflicts.parallelConflictLines 'parallel-conflict-lines': gl.mergeConflicts.parallelConflictLines
}, },
computed: { computed: {
conflictsCountText() { return mergeConflictsStore.getConflictsCountText() }, conflictsCountText() { return mergeConflictsStore.getConflictsCountText(); },
readyToCommit() { return mergeConflictsStore.isReadyToCommit() }, readyToCommit() { return mergeConflictsStore.isReadyToCommit(); },
commitButtonText() { return mergeConflictsStore.getCommitButtonText() }, commitButtonText() { return mergeConflictsStore.getCommitButtonText(); },
showDiffViewTypeSwitcher() { return mergeConflictsStore.fileTextTypePresent() } showDiffViewTypeSwitcher() { return mergeConflictsStore.fileTextTypePresent(); }
}, },
created() { created() {
mergeConflictsService mergeConflictsService
...@@ -88,5 +88,5 @@ $(() => { ...@@ -88,5 +88,5 @@ $(() => {
}); });
} }
} }
}) });
}); });
/* eslint-disable max-len, no-var, func-names, space-before-function-paren, vars-on-top, comma-dangle, no-return-assign, consistent-return, no-param-reassign, one-var, one-var-declaration-per-line, quotes, prefer-template, no-else-return, prefer-arrow-callback, no-unused-vars, no-underscore-dangle, no-shadow, no-mixed-operators, template-curly-spacing, camelcase, default-case, wrap-iife, semi, padded-blocks */ /* eslint-disable max-len, no-var, func-names, space-before-function-paren, vars-on-top, comma-dangle, no-return-assign, consistent-return, no-param-reassign, one-var, one-var-declaration-per-line, quotes, prefer-template, no-else-return, prefer-arrow-callback, no-unused-vars, no-underscore-dangle, no-shadow, no-mixed-operators, template-curly-spacing, camelcase, default-case, wrap-iife, padded-blocks */
/* global notify */ /* global notify */
/* global notifyPermissions */ /* global notifyPermissions */
/* global merge_request_widget */ /* global merge_request_widget */
...@@ -90,7 +90,7 @@ ...@@ -90,7 +90,7 @@
const $ciSuccessIcon = $('.js-success-icon'); const $ciSuccessIcon = $('.js-success-icon');
this.$ciSuccessIcon = $ciSuccessIcon.html(); this.$ciSuccessIcon = $ciSuccessIcon.html();
$ciSuccessIcon.remove(); $ciSuccessIcon.remove();
} };
MergeRequestWidget.prototype.mergeInProgress = function(deleteSourceBranch) { MergeRequestWidget.prototype.mergeInProgress = function(deleteSourceBranch) {
if (deleteSourceBranch == null) { if (deleteSourceBranch == null) {
...@@ -205,7 +205,7 @@ ...@@ -205,7 +205,7 @@
} }
environment.ci_success_icon = this.$ciSuccessIcon; environment.ci_success_icon = this.$ciSuccessIcon;
const templateString = _.unescape($template[0].outerHTML); const templateString = _.unescape($template[0].outerHTML);
const template = _.template(templateString)(environment) const template = _.template(templateString)(environment);
this.$widgetBody.before(template); this.$widgetBody.before(template);
} }
}; };
......
/* eslint-disable no-restricted-properties, func-names, space-before-function-paren, no-var, space-before-blocks, prefer-rest-params, wrap-iife, no-use-before-define, camelcase, no-unused-expressions, quotes, max-len, one-var, one-var-declaration-per-line, default-case, prefer-template, consistent-return, no-alert, no-return-assign, no-param-reassign, prefer-arrow-callback, no-else-return, comma-dangle, no-new, brace-style, no-lonely-if, vars-on-top, no-unused-vars, semi, indent, no-sequences, no-shadow, newline-per-chained-call, no-useless-escape, radix, padded-blocks */ /* eslint-disable no-restricted-properties, func-names, space-before-function-paren, no-var, space-before-blocks, prefer-rest-params, wrap-iife, no-use-before-define, camelcase, no-unused-expressions, quotes, max-len, one-var, one-var-declaration-per-line, default-case, prefer-template, consistent-return, no-alert, no-return-assign, no-param-reassign, prefer-arrow-callback, no-else-return, comma-dangle, no-new, brace-style, no-lonely-if, vars-on-top, no-unused-vars, indent, no-sequences, no-shadow, newline-per-chained-call, no-useless-escape, radix, padded-blocks */
/* global Flash */ /* global Flash */
/* global GLForm */ /* global GLForm */
/* global Autosave */ /* global Autosave */
...@@ -508,7 +508,7 @@ ...@@ -508,7 +508,7 @@
} }
return isAllowed; return isAllowed;
} };
/* /*
...@@ -903,7 +903,7 @@ ...@@ -903,7 +903,7 @@
$editForm.find('.js-note-text').focus().val(originalContent); $editForm.find('.js-note-text').focus().val(originalContent);
$editForm.find('.js-md-write-button').trigger('click'); $editForm.find('.js-md-write-button').trigger('click');
$editForm.find('.referenced-users').hide(); $editForm.find('.referenced-users').hide();
} };
Notes.prototype.updateTaskList = function(e) { Notes.prototype.updateTaskList = function(e) {
var $target = $(e.target); var $target = $(e.target);
......
/* eslint-disable no-useless-escape, max-len, padded-blocks, quotes, no-var, no-underscore-dangle, func-names, space-before-function-paren, no-unused-vars, no-return-assign, object-shorthand, one-var, one-var-declaration-per-line, comma-dangle, consistent-return, class-methods-use-this, new-parens, semi */ /* eslint-disable no-useless-escape, max-len, padded-blocks, quotes, no-var, no-underscore-dangle, func-names, space-before-function-paren, no-unused-vars, no-return-assign, object-shorthand, one-var, one-var-declaration-per-line, comma-dangle, consistent-return, class-methods-use-this, new-parens */
((global) => { ((global) => {
...@@ -169,6 +169,6 @@ ...@@ -169,6 +169,6 @@
return this.each(function() { return this.each(function() {
return $(this).data('glcrop', new GitLabCrop(this, opts)); return $(this).data('glcrop', new GitLabCrop(this, opts));
}); });
} };
})(window.gl || (window.gl = {})); })(window.gl || (window.gl = {}));
/* eslint-disable func-names, space-before-function-paren, wrap-iife, no-var, quotes, consistent-return, no-new, prefer-arrow-callback, no-return-assign, one-var, one-var-declaration-per-line, object-shorthand, comma-dangle, no-else-return, newline-per-chained-call, no-shadow, semi, vars-on-top, indent, prefer-template, padded-blocks, max-len */ /* eslint-disable func-names, space-before-function-paren, wrap-iife, no-var, quotes, consistent-return, no-new, prefer-arrow-callback, no-return-assign, one-var, one-var-declaration-per-line, object-shorthand, comma-dangle, no-else-return, newline-per-chained-call, no-shadow, vars-on-top, indent, prefer-template, padded-blocks, max-len */
/* global Cookies */ /* global Cookies */
/* global Turbolinks */ /* global Turbolinks */
/* global ProjectSelect */ /* global ProjectSelect */
...@@ -94,7 +94,7 @@ ...@@ -94,7 +94,7 @@
return $el.text().trim(); return $el.text().trim();
}, },
clicked: function(selected, $el, e) { clicked: function(selected, $el, e) {
e.preventDefault() e.preventDefault();
if ($('input[name="ref"]').length) { if ($('input[name="ref"]').length) {
var $form = $dropdown.closest('form'), var $form = $dropdown.closest('form'),
action = $form.attr('action'), action = $form.attr('action'),
......
/* eslint-disable arrow-parens, no-param-reassign, no-irregular-whitespace, object-shorthand, no-else-return, comma-dangle, semi, padded-blocks, max-len */ /* eslint-disable arrow-parens, no-param-reassign, no-irregular-whitespace, object-shorthand, no-else-return, comma-dangle, padded-blocks, max-len */
(global => { (global => {
global.gl = global.gl || {}; global.gl = global.gl || {};
...@@ -25,6 +25,6 @@ ...@@ -25,6 +25,6 @@
} }
}); });
} }
} };
})(window); })(window);
/* eslint-disable no-new, arrow-parens, no-param-reassign, no-irregular-whitespace, comma-dangle, padded-blocks, semi, max-len */ /* eslint-disable no-new, arrow-parens, no-param-reassign, no-irregular-whitespace, comma-dangle, padded-blocks, max-len */
/* global ProtectedBranchDropdown */ /* global ProtectedBranchDropdown */
(global => { (global => {
...@@ -52,6 +52,6 @@ ...@@ -52,6 +52,6 @@
this.$form.find('input[type="submit"]').attr('disabled', !($branchInput.val() && $allowedToMergeInput.length && $allowedToPushInput.length)); this.$form.find('input[type="submit"]').attr('disabled', !($branchInput.val() && $allowedToMergeInput.length && $allowedToPushInput.length));
} }
} };
})(window); })(window);
/* eslint-disable no-new, arrow-parens, no-param-reassign, no-irregular-whitespace, padded-blocks, comma-dangle, no-trailing-spaces, semi, max-len */ /* eslint-disable no-new, arrow-parens, no-param-reassign, no-irregular-whitespace, padded-blocks, comma-dangle, no-trailing-spaces, max-len */
/* global Flash */ /* global Flash */
(global => { (global => {
...@@ -63,6 +63,6 @@ ...@@ -63,6 +63,6 @@
} }
}); });
} }
} };
})(window); })(window);
/* eslint-disable arrow-parens, no-param-reassign, no-irregular-whitespace, no-new, comma-dangle, semi, padded-blocks, max-len */ /* eslint-disable arrow-parens, no-param-reassign, no-irregular-whitespace, no-new, comma-dangle, padded-blocks, max-len */
(global => { (global => {
global.gl = global.gl || {}; global.gl = global.gl || {};
...@@ -14,6 +14,6 @@ ...@@ -14,6 +14,6 @@
}); });
}); });
} }
} };
})(window); })(window);
/* eslint-disable func-names, space-before-function-paren, no-var, space-before-blocks, prefer-rest-params, wrap-iife, no-unused-vars, semi, consistent-return, one-var, one-var-declaration-per-line, quotes, prefer-template, object-shorthand, comma-dangle, no-else-return, no-param-reassign, padded-blocks, max-len */ /* eslint-disable func-names, space-before-function-paren, no-var, space-before-blocks, prefer-rest-params, wrap-iife, no-unused-vars, consistent-return, one-var, one-var-declaration-per-line, quotes, prefer-template, object-shorthand, comma-dangle, no-else-return, no-param-reassign, padded-blocks, max-len */
/* global Cookies */ /* global Cookies */
(function() { (function() {
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
$('.dropdown').off('loading.gl.dropdown'); $('.dropdown').off('loading.gl.dropdown');
$('.dropdown').off('loaded.gl.dropdown'); $('.dropdown').off('loaded.gl.dropdown');
$(document).off('click', '.js-sidebar-toggle'); $(document).off('click', '.js-sidebar-toggle');
} };
Sidebar.prototype.addEventListeners = function() { Sidebar.prototype.addEventListeners = function() {
this.sidebar.on('click', '.sidebar-collapsed-icon', this, this.sidebarCollapseClicked); this.sidebar.on('click', '.sidebar-collapsed-icon', this, this.sidebarCollapseClicked);
......
/* eslint-disable comma-dangle, no-return-assign, one-var, no-var, no-underscore-dangle, one-var-declaration-per-line, no-unused-vars, no-cond-assign, consistent-return, object-shorthand, prefer-arrow-callback, func-names, space-before-function-paren, prefer-template, quotes, class-methods-use-this, no-unused-expressions, no-sequences, wrap-iife, no-lonely-if, no-else-return, no-param-reassign, vars-on-top, padded-blocks, no-extra-semi, indent, max-len */ /* eslint-disable comma-dangle, no-return-assign, one-var, no-var, no-underscore-dangle, one-var-declaration-per-line, no-unused-vars, no-cond-assign, consistent-return, object-shorthand, prefer-arrow-callback, func-names, space-before-function-paren, prefer-template, quotes, class-methods-use-this, no-unused-expressions, no-sequences, wrap-iife, no-lonely-if, no-else-return, no-param-reassign, vars-on-top, padded-blocks, indent, max-len */
((global) => { ((global) => {
...@@ -216,7 +216,7 @@ ...@@ -216,7 +216,7 @@
this.dropdown.addClass('open').trigger('shown.bs.dropdown'); this.dropdown.addClass('open').trigger('shown.bs.dropdown');
return this.searchInput.removeClass('disabled'); return this.searchInput.removeClass('disabled');
} }
}; }
// Saves last length of the entered text // Saves last length of the entered text
onSearchInputKeyDown() { onSearchInputKeyDown() {
...@@ -305,7 +305,7 @@ ...@@ -305,7 +305,7 @@
hasLocationBadge() { hasLocationBadge() {
return this.wrap.is('.has-location-badge'); return this.wrap.is('.has-location-badge');
}; }
restoreOriginalState() { restoreOriginalState() {
var i, input, inputs, len; var i, input, inputs, len;
...@@ -361,7 +361,7 @@ ...@@ -361,7 +361,7 @@
var html; var html;
html = "<ul> <li><a class='dropdown-menu-empty-link is-focused'>Loading...</a></li> </ul>"; html = "<ul> <li><a class='dropdown-menu-empty-link is-focused'>Loading...</a></li> </ul>";
return this.dropdownContent.html(html); return this.dropdownContent.html(html);
}; }
onClick(item, $el, e) { onClick(item, $el, e) {
if (location.pathname.indexOf(item.url) !== -1) { if (location.pathname.indexOf(item.url) !== -1) {
...@@ -384,7 +384,7 @@ ...@@ -384,7 +384,7 @@
this.disableAutocomplete(); this.disableAutocomplete();
return this.searchInput.val('').focus(); return this.searchInput.val('').focus();
} }
}; }
} }
......
/* eslint-disable func-names, space-before-function-paren, prefer-arrow-callback, no-var, quotes, semi, padded-blocks, max-len */ /* eslint-disable func-names, space-before-function-paren, prefer-arrow-callback, no-var, quotes, padded-blocks, max-len */
/* global ace */ /* global ace */
/*= require_tree . */ /*= require_tree . */
(function() { (function() {
$(function() { $(function() {
var editor = ace.edit("editor") var editor = ace.edit("editor");
$(".snippet-form-holder form").on('submit', function() { $(".snippet-form-holder form").on('submit', function() {
$(".snippet-file-content").val(editor.getValue()); $(".snippet-file-content").val(editor.getValue());
......
/* eslint-disable arrow-parens, no-param-reassign, space-before-function-paren, func-names, no-var, semi, max-len */ /* eslint-disable arrow-parens, no-param-reassign, space-before-function-paren, func-names, no-var, max-len */
(global => { (global => {
global.gl = global.gl || {}; global.gl = global.gl || {};
...@@ -9,5 +9,5 @@ ...@@ -9,5 +9,5 @@
$holder.find('.pagination').on('ajax:success', (e, data) => { $holder.find('.pagination').on('ajax:success', (e, data) => {
$holder.replaceWith(data.html); $holder.replaceWith(data.html);
}); });
} };
})(window); })(window);
/* eslint-disable padded-blocks, class-methods-use-this, no-new, func-names, prefer-template, no-unneeded-ternary, object-shorthand, space-before-function-paren, comma-dangle, quote-props, consistent-return, no-else-return, semi, no-param-reassign, max-len */ /* eslint-disable padded-blocks, class-methods-use-this, no-new, func-names, prefer-template, no-unneeded-ternary, object-shorthand, space-before-function-paren, comma-dangle, quote-props, consistent-return, no-else-return, no-param-reassign, max-len */
/* global UsersSelect */ /* global UsersSelect */
/* global Turbolinks */ /* global Turbolinks */
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
clicked: function() { clicked: function() {
return $dropdown.closest('form.filter-form').submit(); return $dropdown.closest('form.filter-form').submit();
} }
}) });
} }
doneClicked(e) { doneClicked(e) {
......
/* eslint-disable class-methods-use-this, comma-dangle, arrow-parens, no-param-reassign, semi */ /* eslint-disable class-methods-use-this, comma-dangle, arrow-parens, no-param-reassign */
/* global Cookies */ /* global Cookies */
((global) => { ((global) => {
...@@ -30,5 +30,5 @@ ...@@ -30,5 +30,5 @@
$(this).parents('.project-limit-message').remove(); $(this).parents('.project-limit-message').remove();
}); });
} }
} };
})(window.gl || (window.gl = {})); })(window.gl || (window.gl = {}));
/* eslint-disable max-len, space-before-function-paren, no-underscore-dangle, array-bracket-spacing, consistent-return, comma-dangle, no-unused-vars, dot-notation, no-new, no-return-assign, camelcase, semi, no-param-reassign */ /* eslint-disable max-len, space-before-function-paren, no-underscore-dangle, array-bracket-spacing, consistent-return, comma-dangle, no-unused-vars, dot-notation, no-new, no-return-assign, camelcase, no-param-reassign */
/* /*
UserTabs UserTabs
...@@ -145,7 +145,7 @@ content on the Users#show page. ...@@ -145,7 +145,7 @@ content on the Users#show page.
} }
setCurrentAction(source, action) { setCurrentAction(source, action) {
let new_state = source let new_state = source;
new_state = new_state.replace(/\/+$/, ''); new_state = new_state.replace(/\/+$/, '');
new_state += this._location.search + this._location.hash; new_state += this._location.search + this._location.hash;
history.replaceState({ history.replaceState({
......
/* eslint-disable func-names, space-before-function-paren, no-var, space-before-blocks, prefer-rest-params, wrap-iife, camelcase, vars-on-top, semi, keyword-spacing, object-shorthand, comma-dangle, eqeqeq, no-mixed-operators, no-return-assign, newline-per-chained-call, prefer-arrow-callback, consistent-return, one-var, one-var-declaration-per-line, prefer-template, quotes, no-unused-vars, no-else-return, padded-blocks, max-len */ /* eslint-disable func-names, space-before-function-paren, no-var, space-before-blocks, prefer-rest-params, wrap-iife, camelcase, vars-on-top, keyword-spacing, object-shorthand, comma-dangle, eqeqeq, no-mixed-operators, no-return-assign, newline-per-chained-call, prefer-arrow-callback, consistent-return, one-var, one-var-declaration-per-line, prefer-template, quotes, no-unused-vars, no-else-return, padded-blocks, max-len */
/* global d3 */ /* global d3 */
/* global dateFormat */ /* global dateFormat */
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
this.timestampsTmp = []; this.timestampsTmp = [];
var group = 0; var group = 0;
var today = new Date() var today = new Date();
today.setHours(0, 0, 0, 0, 0); today.setHours(0, 0, 0, 0, 0);
var oneYearAgo = new Date(today); var oneYearAgo = new Date(today);
...@@ -74,7 +74,7 @@ ...@@ -74,7 +74,7 @@
} }
return extraWidthPadding; return extraWidthPadding;
} };
Calendar.prototype.renderSvg = function(group) { Calendar.prototype.renderSvg = function(group) {
var width = (group + 1) * this.daySizeWithSpace + this.getExtraWidthPadding(group); var width = (group + 1) * this.daySizeWithSpace + this.getExtraWidthPadding(group);
......
/* eslint-disable no-unused-expressions, comma-spacing, prefer-const, no-prototype-builtins, semi, no-new, keyword-spacing, no-shadow, max-len */ /* eslint-disable no-unused-expressions, comma-spacing, prefer-const, no-prototype-builtins, no-new, keyword-spacing, no-shadow, max-len */
/*= require js.cookie.js */ /*= require js.cookie.js */
/*= require jquery.endless-scroll.js */ /*= require jquery.endless-scroll.js */
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
function getSelector(index) { function getSelector(index) {
let filter = filters[index]; let filter = filters[index];
return `#${filter.id}_event_filter` return `#${filter.id}_event_filter`;
} }
describe('Activities', () => { describe('Activities', () => {
......
/* eslint-disable no-extra-semi, jasmine/no-global-setup, dot-notation, jasmine/no-expect-in-setup-teardown, max-len */ /* eslint-disable jasmine/no-global-setup, dot-notation, jasmine/no-expect-in-setup-teardown, max-len */
/* global CommentsStore */ /* global CommentsStore */
//= require vue //= require vue
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
(() => { (() => {
function createDiscussion(noteId = 1, resolved = true) { function createDiscussion(noteId = 1, resolved = true) {
CommentsStore.create('a', noteId, true, resolved, 'test'); CommentsStore.create('a', noteId, true, resolved, 'test');
}; }
beforeEach(() => { beforeEach(() => {
CommentsStore.state = {}; CommentsStore.state = {};
......
/* eslint-disable comma-dangle, prefer-const, no-param-reassign, semi, no-unused-expressions, arrow-spacing, max-len */ /* eslint-disable comma-dangle, prefer-const, no-param-reassign, no-unused-expressions, arrow-spacing, max-len */
/* global Turbolinks */ /* global Turbolinks */
/*= require jquery */ /*= require jquery */
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
let remoteMock = function remoteMock(data, term, callback) { let remoteMock = function remoteMock(data, term, callback) {
remoteCallback = callback.bind({}, data); remoteCallback = callback.bind({}, data);
} };
describe('Dropdown', function describeDropdown() { describe('Dropdown', function describeDropdown() {
preloadFixtures('static/gl_dropdown.html.raw'); preloadFixtures('static/gl_dropdown.html.raw');
...@@ -109,8 +109,8 @@ ...@@ -109,8 +109,8 @@
}); });
it('should click the selected item on ENTER keypress', () => { it('should click the selected item on ENTER keypress', () => {
expect(this.dropdownContainerElement).toHaveClass('open') expect(this.dropdownContainerElement).toHaveClass('open');
let randomIndex = Math.floor(Math.random() * (this.projectsData.length - 1)) + 0 let randomIndex = Math.floor(Math.random() * (this.projectsData.length - 1)) + 0;
navigateWithKeys('down', randomIndex, () => { navigateWithKeys('down', randomIndex, () => {
spyOn(Turbolinks, 'visit').and.stub(); spyOn(Turbolinks, 'visit').and.stub();
navigateWithKeys('enter', null, () => { navigateWithKeys('enter', null, () => {
......
/* eslint-disable quotes, indent, semi, object-curly-spacing, jasmine/no-suite-dupes, vars-on-top, no-var, padded-blocks, spaced-comment, max-len */ /* eslint-disable quotes, indent, object-curly-spacing, jasmine/no-suite-dupes, vars-on-top, no-var, padded-blocks, spaced-comment, max-len */
/* global d3 */ /* global d3 */
/* global ContributorsGraph */ /* global ContributorsGraph */
/* global ContributorsMasterGraph */ /* global ContributorsMasterGraph */
...@@ -8,126 +8,126 @@ ...@@ -8,126 +8,126 @@
describe("ContributorsGraph", function () { describe("ContributorsGraph", function () {
describe("#set_x_domain", function () { describe("#set_x_domain", function () {
it("set the x_domain", function () { it("set the x_domain", function () {
ContributorsGraph.set_x_domain(20) ContributorsGraph.set_x_domain(20);
expect(ContributorsGraph.prototype.x_domain).toEqual(20) expect(ContributorsGraph.prototype.x_domain).toEqual(20);
}) });
}) });
describe("#set_y_domain", function () { describe("#set_y_domain", function () {
it("sets the y_domain", function () { it("sets the y_domain", function () {
ContributorsGraph.set_y_domain([{commits: 30}]) ContributorsGraph.set_y_domain([{commits: 30}]);
expect(ContributorsGraph.prototype.y_domain).toEqual([0, 30]) expect(ContributorsGraph.prototype.y_domain).toEqual([0, 30]);
}) });
}) });
describe("#init_x_domain", function () { describe("#init_x_domain", function () {
it("sets the initial x_domain", function () { it("sets the initial x_domain", function () {
ContributorsGraph.init_x_domain([{date: "2013-01-31"}, {date: "2012-01-31"}]) ContributorsGraph.init_x_domain([{date: "2013-01-31"}, {date: "2012-01-31"}]);
expect(ContributorsGraph.prototype.x_domain).toEqual(["2012-01-31", "2013-01-31"]) expect(ContributorsGraph.prototype.x_domain).toEqual(["2012-01-31", "2013-01-31"]);
}) });
}) });
describe("#init_y_domain", function () { describe("#init_y_domain", function () {
it("sets the initial y_domain", function () { it("sets the initial y_domain", function () {
ContributorsGraph.init_y_domain([{commits: 30}]) ContributorsGraph.init_y_domain([{commits: 30}]);
expect(ContributorsGraph.prototype.y_domain).toEqual([0, 30]) expect(ContributorsGraph.prototype.y_domain).toEqual([0, 30]);
}) });
}) });
describe("#init_domain", function () { describe("#init_domain", function () {
it("calls init_x_domain and init_y_domain", function () { it("calls init_x_domain and init_y_domain", function () {
spyOn(ContributorsGraph, "init_x_domain") spyOn(ContributorsGraph, "init_x_domain");
spyOn(ContributorsGraph, "init_y_domain") spyOn(ContributorsGraph, "init_y_domain");
ContributorsGraph.init_domain() ContributorsGraph.init_domain();
expect(ContributorsGraph.init_x_domain).toHaveBeenCalled() expect(ContributorsGraph.init_x_domain).toHaveBeenCalled();
expect(ContributorsGraph.init_y_domain).toHaveBeenCalled() expect(ContributorsGraph.init_y_domain).toHaveBeenCalled();
}) });
}) });
describe("#set_dates", function () { describe("#set_dates", function () {
it("sets the dates", function () { it("sets the dates", function () {
ContributorsGraph.set_dates("2013-12-01") ContributorsGraph.set_dates("2013-12-01");
expect(ContributorsGraph.prototype.dates).toEqual("2013-12-01") expect(ContributorsGraph.prototype.dates).toEqual("2013-12-01");
}) });
}) });
describe("#set_x_domain", function () { describe("#set_x_domain", function () {
it("sets the instance's x domain using the prototype's x_domain", function () { it("sets the instance's x domain using the prototype's x_domain", function () {
ContributorsGraph.prototype.x_domain = 20 ContributorsGraph.prototype.x_domain = 20;
var instance = new ContributorsGraph() var instance = new ContributorsGraph();
instance.x = d3.time.scale().range([0, 100]).clamp(true) instance.x = d3.time.scale().range([0, 100]).clamp(true);
spyOn(instance.x, 'domain') spyOn(instance.x, 'domain');
instance.set_x_domain() instance.set_x_domain();
expect(instance.x.domain).toHaveBeenCalledWith(20) expect(instance.x.domain).toHaveBeenCalledWith(20);
}) });
}) });
describe("#set_y_domain", function () { describe("#set_y_domain", function () {
it("sets the instance's y domain using the prototype's y_domain", function () { it("sets the instance's y domain using the prototype's y_domain", function () {
ContributorsGraph.prototype.y_domain = 30 ContributorsGraph.prototype.y_domain = 30;
var instance = new ContributorsGraph() var instance = new ContributorsGraph();
instance.y = d3.scale.linear().range([100, 0]).nice() instance.y = d3.scale.linear().range([100, 0]).nice();
spyOn(instance.y, 'domain') spyOn(instance.y, 'domain');
instance.set_y_domain() instance.set_y_domain();
expect(instance.y.domain).toHaveBeenCalledWith(30) expect(instance.y.domain).toHaveBeenCalledWith(30);
}) });
}) });
describe("#set_domain", function () { describe("#set_domain", function () {
it("calls set_x_domain and set_y_domain", function () { it("calls set_x_domain and set_y_domain", function () {
var instance = new ContributorsGraph() var instance = new ContributorsGraph();
spyOn(instance, 'set_x_domain') spyOn(instance, 'set_x_domain');
spyOn(instance, 'set_y_domain') spyOn(instance, 'set_y_domain');
instance.set_domain() instance.set_domain();
expect(instance.set_x_domain).toHaveBeenCalled() expect(instance.set_x_domain).toHaveBeenCalled();
expect(instance.set_y_domain).toHaveBeenCalled() expect(instance.set_y_domain).toHaveBeenCalled();
}) });
}) });
describe("#set_data", function () { describe("#set_data", function () {
it("sets the data", function () { it("sets the data", function () {
var instance = new ContributorsGraph() var instance = new ContributorsGraph();
instance.set_data("20") instance.set_data("20");
expect(instance.data).toEqual("20") expect(instance.data).toEqual("20");
}) });
}) });
}) });
describe("ContributorsMasterGraph", function () { describe("ContributorsMasterGraph", function () {
// TODO: fix or remove // TODO: fix or remove
//describe("#process_dates", function () { //describe("#process_dates", function () {
//it("gets and parses dates", function () { //it("gets and parses dates", function () {
//var graph = new ContributorsMasterGraph() //var graph = new ContributorsMasterGraph();
//var data = 'random data here' //var data = 'random data here';
//spyOn(graph, 'parse_dates') //spyOn(graph, 'parse_dates');
//spyOn(graph, 'get_dates').andReturn("get") //spyOn(graph, 'get_dates').andReturn("get");
//spyOn(ContributorsGraph,'set_dates').andCallThrough() //spyOn(ContributorsGraph,'set_dates').andCallThrough();
//graph.process_dates(data) //graph.process_dates(data);
//expect(graph.parse_dates).toHaveBeenCalledWith(data) //expect(graph.parse_dates).toHaveBeenCalledWith(data);
//expect(graph.get_dates).toHaveBeenCalledWith(data) //expect(graph.get_dates).toHaveBeenCalledWith(data);
//expect(ContributorsGraph.set_dates).toHaveBeenCalledWith("get") //expect(ContributorsGraph.set_dates).toHaveBeenCalledWith("get");
//}) //});
//}) //});
describe("#get_dates", function () { describe("#get_dates", function () {
it("plucks the date field from data collection", function () { it("plucks the date field from data collection", function () {
var graph = new ContributorsMasterGraph() var graph = new ContributorsMasterGraph();
var data = [{date: "2013-01-01"}, {date: "2012-12-15"}] var data = [{date: "2013-01-01"}, {date: "2012-12-15"}];
expect(graph.get_dates(data)).toEqual(["2013-01-01", "2012-12-15"]) expect(graph.get_dates(data)).toEqual(["2013-01-01", "2012-12-15"]);
}) });
}) });
describe("#parse_dates", function () { describe("#parse_dates", function () {
it("parses the dates", function () { it("parses the dates", function () {
var graph = new ContributorsMasterGraph() var graph = new ContributorsMasterGraph();
var parseDate = d3.time.format("%Y-%m-%d").parse var parseDate = d3.time.format("%Y-%m-%d").parse;
var data = [{date: "2013-01-01"}, {date: "2012-12-15"}] var data = [{date: "2013-01-01"}, {date: "2012-12-15"}];
var correct = [{date: parseDate(data[0].date)}, {date: parseDate(data[1].date)}] var correct = [{date: parseDate(data[0].date)}, {date: parseDate(data[1].date)}];
graph.parse_dates(data) graph.parse_dates(data);
expect(data).toEqual(correct) expect(data).toEqual(correct);
}) });
}) });
}) });
/* 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, 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
...@@ -11,7 +11,7 @@ describe("ContributorsStatGraphUtil", function () { ...@@ -11,7 +11,7 @@ describe("ContributorsStatGraphUtil", function () {
{author_email: "karlo@email.com", author_name: "Karlo Soriano", date: "2013-05-09", additions: 471}, {author_email: "karlo@email.com", author_name: "Karlo Soriano", date: "2013-05-09", additions: 471},
{author_email: "dzaporozhets@email.com", author_name: "Dmitriy Zaporozhets", date: "2013-05-08", additions: 6, deletions: 1}, {author_email: "dzaporozhets@email.com", author_name: "Dmitriy Zaporozhets", date: "2013-05-08", additions: 6, deletions: 1},
{author_email: "dzaporozhets@email.com", author_name: "Dmitriy Zaporozhets", date: "2013-05-08", additions: 19, deletions: 3}, {author_email: "dzaporozhets@email.com", author_name: "Dmitriy Zaporozhets", date: "2013-05-08", additions: 19, deletions: 3},
{author_email: "dzaporozhets@email.com", author_name: "Dmitriy Zaporozhets", date: "2013-05-08", additions: 29, deletions: 3}] {author_email: "dzaporozhets@email.com", author_name: "Dmitriy Zaporozhets", date: "2013-05-08", additions: 29, deletions: 3}];
var correct_parsed_log = { var correct_parsed_log = {
total: [ total: [
...@@ -28,106 +28,106 @@ describe("ContributorsStatGraphUtil", function () { ...@@ -28,106 +28,106 @@ describe("ContributorsStatGraphUtil", function () {
"2013-05-08": {date: "2013-05-08", additions: 54, deletions: 7, commits: 3} "2013-05-08": {date: "2013-05-08", additions: 54, deletions: 7, commits: 3}
} }
] ]
} };
expect(ContributorsStatGraphUtil.parse_log(fake_log)).toEqual(correct_parsed_log) expect(ContributorsStatGraphUtil.parse_log(fake_log)).toEqual(correct_parsed_log);
}) });
}) });
describe("#store_data", function () { describe("#store_data", function () {
var fake_entry = {author: "Karlo Soriano", date: "2013-05-09", additions: 471} var fake_entry = {author: "Karlo Soriano", date: "2013-05-09", additions: 471};
var fake_total = {} var fake_total = {};
var fake_by_author = {} var fake_by_author = {};
it("calls #store_commits", function () { it("calls #store_commits", function () {
spyOn(ContributorsStatGraphUtil, 'store_commits') spyOn(ContributorsStatGraphUtil, 'store_commits');
ContributorsStatGraphUtil.store_data(fake_entry, fake_total, fake_by_author) ContributorsStatGraphUtil.store_data(fake_entry, fake_total, fake_by_author);
expect(ContributorsStatGraphUtil.store_commits).toHaveBeenCalled() expect(ContributorsStatGraphUtil.store_commits).toHaveBeenCalled();
}) });
it("calls #store_additions", function () { it("calls #store_additions", function () {
spyOn(ContributorsStatGraphUtil, 'store_additions') spyOn(ContributorsStatGraphUtil, 'store_additions');
ContributorsStatGraphUtil.store_data(fake_entry, fake_total, fake_by_author) ContributorsStatGraphUtil.store_data(fake_entry, fake_total, fake_by_author);
expect(ContributorsStatGraphUtil.store_additions).toHaveBeenCalled() expect(ContributorsStatGraphUtil.store_additions).toHaveBeenCalled();
}) });
it("calls #store_deletions", function () { it("calls #store_deletions", function () {
spyOn(ContributorsStatGraphUtil, 'store_deletions') spyOn(ContributorsStatGraphUtil, 'store_deletions');
ContributorsStatGraphUtil.store_data(fake_entry, fake_total, fake_by_author) ContributorsStatGraphUtil.store_data(fake_entry, fake_total, fake_by_author);
expect(ContributorsStatGraphUtil.store_deletions).toHaveBeenCalled() expect(ContributorsStatGraphUtil.store_deletions).toHaveBeenCalled();
}) });
}) });
// TODO: fix or remove // TODO: fix or remove
//describe("#store_commits", function () { //describe("#store_commits", function () {
//var fake_total = "fake_total" //var fake_total = "fake_total";
//var fake_by_author = "fake_by_author" //var fake_by_author = "fake_by_author";
//it("calls #add twice with arguments fake_total and fake_by_author respectively", function () { //it("calls #add twice with arguments fake_total and fake_by_author respectively", function () {
//spyOn(ContributorsStatGraphUtil, 'add') //spyOn(ContributorsStatGraphUtil, 'add');
//ContributorsStatGraphUtil.store_commits(fake_total, fake_by_author) //ContributorsStatGraphUtil.store_commits(fake_total, fake_by_author);
//expect(ContributorsStatGraphUtil.add.argsForCall).toEqual([["fake_total", "commits", 1], ["fake_by_author", "commits", 1]]) //expect(ContributorsStatGraphUtil.add.argsForCall).toEqual([["fake_total", "commits", 1], ["fake_by_author", "commits", 1]]);
//}) //});
//}) //});
describe("#add", function () { describe("#add", function () {
it("adds 1 to current test_field in collection", function () { it("adds 1 to current test_field in collection", function () {
var fake_collection = {test_field: 10} var fake_collection = {test_field: 10};
ContributorsStatGraphUtil.add(fake_collection, "test_field", 1) ContributorsStatGraphUtil.add(fake_collection, "test_field", 1);
expect(fake_collection.test_field).toEqual(11) expect(fake_collection.test_field).toEqual(11);
}) });
it("inits and adds 1 if test_field in collection is not defined", function () { it("inits and adds 1 if test_field in collection is not defined", function () {
var fake_collection = {} var fake_collection = {};
ContributorsStatGraphUtil.add(fake_collection, "test_field", 1) ContributorsStatGraphUtil.add(fake_collection, "test_field", 1);
expect(fake_collection.test_field).toEqual(1) expect(fake_collection.test_field).toEqual(1);
}) });
}) });
// TODO: fix or remove // TODO: fix or remove
//describe("#store_additions", function () { //describe("#store_additions", function () {
//var fake_entry = {additions: 10} //var fake_entry = {additions: 10};
//var fake_total= "fake_total" //var fake_total= "fake_total";
//var fake_by_author = "fake_by_author" //var fake_by_author = "fake_by_author";
//it("calls #add twice with arguments fake_total and fake_by_author respectively", function () { //it("calls #add twice with arguments fake_total and fake_by_author respectively", function () {
//spyOn(ContributorsStatGraphUtil, 'add') //spyOn(ContributorsStatGraphUtil, 'add');
//ContributorsStatGraphUtil.store_additions(fake_entry, fake_total, fake_by_author) //ContributorsStatGraphUtil.store_additions(fake_entry, fake_total, fake_by_author);
//expect(ContributorsStatGraphUtil.add.argsForCall).toEqual([["fake_total", "additions", 10], ["fake_by_author", "additions", 10]]) //expect(ContributorsStatGraphUtil.add.argsForCall).toEqual([["fake_total", "additions", 10], ["fake_by_author", "additions", 10]]);
//}) //});
//}) //});
// TODO: fix or remove // TODO: fix or remove
//describe("#store_deletions", function () { //describe("#store_deletions", function () {
//var fake_entry = {deletions: 10} //var fake_entry = {deletions: 10};
//var fake_total= "fake_total" //var fake_total= "fake_total";
//var fake_by_author = "fake_by_author" //var fake_by_author = "fake_by_author";
//it("calls #add twice with arguments fake_total and fake_by_author respectively", function () { //it("calls #add twice with arguments fake_total and fake_by_author respectively", function () {
//spyOn(ContributorsStatGraphUtil, 'add') //spyOn(ContributorsStatGraphUtil, 'add');
//ContributorsStatGraphUtil.store_deletions(fake_entry, fake_total, fake_by_author) //ContributorsStatGraphUtil.store_deletions(fake_entry, fake_total, fake_by_author);
//expect(ContributorsStatGraphUtil.add.argsForCall).toEqual([["fake_total", "deletions", 10], ["fake_by_author", "deletions", 10]]) //expect(ContributorsStatGraphUtil.add.argsForCall).toEqual([["fake_total", "deletions", 10], ["fake_by_author", "deletions", 10]]);
//}) //});
//}) //});
describe("#add_date", function () { describe("#add_date", function () {
it("adds a date field to the collection", function () { it("adds a date field to the collection", function () {
var fake_date = "2013-10-02" var fake_date = "2013-10-02";
var fake_collection = {} var fake_collection = {};
ContributorsStatGraphUtil.add_date(fake_date, fake_collection) ContributorsStatGraphUtil.add_date(fake_date, fake_collection);
expect(fake_collection[fake_date].date).toEqual("2013-10-02") expect(fake_collection[fake_date].date).toEqual("2013-10-02");
}) });
}) });
describe("#add_author", function () { describe("#add_author", function () {
it("adds an author field to the collection", function () { it("adds an author field to the collection", function () {
var fake_author = { author_name: "Author", author_email: 'fake@email.com' } var fake_author = { author_name: "Author", author_email: 'fake@email.com' };
var fake_author_collection = {} var fake_author_collection = {};
var fake_email_collection = {} var fake_email_collection = {};
ContributorsStatGraphUtil.add_author(fake_author, fake_author_collection, fake_email_collection) ContributorsStatGraphUtil.add_author(fake_author, fake_author_collection, fake_email_collection);
expect(fake_author_collection[fake_author.author_name].author_name).toEqual("Author") expect(fake_author_collection[fake_author.author_name].author_name).toEqual("Author");
expect(fake_email_collection[fake_author.author_email].author_name).toEqual("Author") expect(fake_email_collection[fake_author.author_email].author_name).toEqual("Author");
}) });
}) });
describe("#get_total_data", function () { describe("#get_total_data", function () {
it("returns the collection sorted via specified field", function () { it("returns the collection sorted via specified field", function () {
...@@ -146,19 +146,19 @@ describe("ContributorsStatGraphUtil", function () { ...@@ -146,19 +146,19 @@ describe("ContributorsStatGraphUtil", function () {
]}; ]};
var correct_total_data = [{date: "2013-05-08", commits: 3}, var correct_total_data = [{date: "2013-05-08", commits: 3},
{date: "2013-05-09", commits: 1}]; {date: "2013-05-09", commits: 1}];
expect(ContributorsStatGraphUtil.get_total_data(fake_parsed_log, "commits")).toEqual(correct_total_data) expect(ContributorsStatGraphUtil.get_total_data(fake_parsed_log, "commits")).toEqual(correct_total_data);
}) });
}) });
describe("#pick_field", function () { describe("#pick_field", function () {
it("returns the collection with only the specified field and date", function () { it("returns the collection with only the specified field and date", function () {
var fake_parsed_log_total = [{date: "2013-05-09", additions: 471, deletions: 0, commits: 1}, var fake_parsed_log_total = [{date: "2013-05-09", additions: 471, deletions: 0, commits: 1},
{date: "2013-05-08", additions: 54, deletions: 7, commits: 3}]; {date: "2013-05-08", additions: 54, deletions: 7, commits: 3}];
ContributorsStatGraphUtil.pick_field(fake_parsed_log_total, "commits") ContributorsStatGraphUtil.pick_field(fake_parsed_log_total, "commits");
var correct_pick_field_data = [{date: "2013-05-09", commits: 1},{date: "2013-05-08", commits: 3}]; var correct_pick_field_data = [{date: "2013-05-09", commits: 1},{date: "2013-05-08", commits: 3}];
expect(ContributorsStatGraphUtil.pick_field(fake_parsed_log_total, "commits")).toEqual(correct_pick_field_data) expect(ContributorsStatGraphUtil.pick_field(fake_parsed_log_total, "commits")).toEqual(correct_pick_field_data);
}) });
}) });
describe("#get_author_data", function () { describe("#get_author_data", function () {
it("returns the log by author sorted by specified field", function () { it("returns the log by author sorted by specified field", function () {
...@@ -177,39 +177,39 @@ describe("ContributorsStatGraphUtil", function () { ...@@ -177,39 +177,39 @@ describe("ContributorsStatGraphUtil", function () {
"2013-05-08": {date: "2013-05-08", additions: 54, deletions: 7, commits: 3} "2013-05-08": {date: "2013-05-08", additions: 54, deletions: 7, commits: 3}
} }
] ]
} };
var correct_author_data = [ var correct_author_data = [
{author_name:"Dmitriy Zaporozhets",author_email:"dzaporozhets@email.com",dates:{"2013-05-08":3},deletions:7,additions:54,"commits":3}, {author_name:"Dmitriy Zaporozhets",author_email:"dzaporozhets@email.com",dates:{"2013-05-08":3},deletions:7,additions:54,"commits":3},
{author_name:"Karlo Soriano",author_email:"karlo@email.com",dates:{"2013-05-09":1},deletions:0,additions:471,commits:1} {author_name:"Karlo Soriano",author_email:"karlo@email.com",dates:{"2013-05-09":1},deletions:0,additions:471,commits:1}
] ];
expect(ContributorsStatGraphUtil.get_author_data(fake_parsed_log, "commits")).toEqual(correct_author_data) expect(ContributorsStatGraphUtil.get_author_data(fake_parsed_log, "commits")).toEqual(correct_author_data);
}) });
}) });
describe("#parse_log_entry", function () { describe("#parse_log_entry", function () {
it("adds the corresponding info from the log entry to the author", function () { it("adds the corresponding info from the log entry to the author", function () {
var fake_log_entry = { author_name: "Karlo Soriano", author_email: "karlo@email.com", var fake_log_entry = { author_name: "Karlo Soriano", author_email: "karlo@email.com",
"2013-05-09": {date: "2013-05-09", additions: 471, deletions: 0, commits: 1} "2013-05-09": {date: "2013-05-09", additions: 471, deletions: 0, commits: 1}
} };
var correct_parsed_log = {author_name:"Karlo Soriano",author_email:"karlo@email.com",dates:{"2013-05-09":1},deletions:0,additions:471,commits:1} var correct_parsed_log = {author_name:"Karlo Soriano",author_email:"karlo@email.com",dates:{"2013-05-09":1},deletions:0,additions:471,commits:1};
expect(ContributorsStatGraphUtil.parse_log_entry(fake_log_entry, 'commits', null)).toEqual(correct_parsed_log) expect(ContributorsStatGraphUtil.parse_log_entry(fake_log_entry, 'commits', null)).toEqual(correct_parsed_log);
}) });
}) });
describe("#in_range", function () { describe("#in_range", function () {
var date = "2013-05-09" var date = "2013-05-09";
it("returns true if date_range is null", function () { it("returns true if date_range is null", function () {
expect(ContributorsStatGraphUtil.in_range(date, null)).toEqual(true) expect(ContributorsStatGraphUtil.in_range(date, null)).toEqual(true);
}) });
it("returns true if date is in range", function () { it("returns true if date is in range", function () {
var date_range = [new Date("2013-01-01"), new Date("2013-12-12")] var date_range = [new Date("2013-01-01"), new Date("2013-12-12")];
expect(ContributorsStatGraphUtil.in_range(date, date_range)).toEqual(true) expect(ContributorsStatGraphUtil.in_range(date, date_range)).toEqual(true);
}) });
it("returns false if date is not in range", function () { it("returns false if date is not in range", function () {
var date_range = [new Date("1999-12-01"), new Date("2000-12-01")] var date_range = [new Date("1999-12-01"), new Date("2000-12-01")];
expect(ContributorsStatGraphUtil.in_range(date, date_range)).toEqual(false) expect(ContributorsStatGraphUtil.in_range(date, date_range)).toEqual(false);
}) });
}) });
}) });
/* eslint-disable quotes, padded-blocks, semi */ /* eslint-disable quotes, padded-blocks */
/* global StatGraph */ /* global StatGraph */
//= require graphs/stat_graph //= require graphs/stat_graph
...@@ -16,7 +16,7 @@ describe("StatGraph", function () { ...@@ -16,7 +16,7 @@ describe("StatGraph", function () {
it("sets the log", function () { it("sets the log", function () {
StatGraph.set_log("test"); StatGraph.set_log("test");
expect(StatGraph.log).toBe("test"); expect(StatGraph.log).toBe("test");
}) });
}) });
}); });
/* eslint-disable no-new, object-curly-spacing, prefer-const, semi */ /* eslint-disable no-new, object-curly-spacing, prefer-const */
/* global IssuableContext */ /* global IssuableContext */
/* global LabelsSelect */ /* global LabelsSelect */
...@@ -26,14 +26,14 @@ ...@@ -26,14 +26,14 @@
spyOn(jQuery, 'ajax').and.callFake((req) => { spyOn(jQuery, 'ajax').and.callFake((req) => {
const d = $.Deferred(); const d = $.Deferred();
let LABELS_DATA = [] let LABELS_DATA = [];
if (req.url === '/root/test/labels.json') { if (req.url === '/root/test/labels.json') {
for (let i = 0; i < 10; i += 1) { for (let i = 0; i < 10; i += 1) {
LABELS_DATA.push({id: i, title: `test ${i}`, color: '#5CB85C'}); LABELS_DATA.push({id: i, title: `test ${i}`, color: '#5CB85C'});
} }
} else if (req.url === '/root/test/issues/2.json') { } else if (req.url === '/root/test/issues/2.json') {
let tmp = [] let tmp = [];
for (let i = 0; i < saveLabelCount; i += 1) { for (let i = 0; i < saveLabelCount; i += 1) {
tmp.push({id: i, title: `test ${i}`, color: '#5CB85C'}); tmp.push({id: i, title: `test ${i}`, color: '#5CB85C'});
} }
......
/* 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, padded-blocks, max-len */
/* global Notes */ /* global Notes */
/*= require notes */ /*= require notes */
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
$('.js-comment-button').click(); $('.js-comment-button').click();
expect(this.autoSizeSpy).toHaveBeenTriggered(); expect(this.autoSizeSpy).toHaveBeenTriggered();
}) });
}); });
}); });
......
/* 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, padded-blocks, max-len */
/* global Sidebar */ /* global Sidebar */
/*= require right_sidebar */ /*= require right_sidebar */
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
$('.js-issuable-todo').click(); $('.js-issuable-todo').click();
expect(todoToggleSpy.calls.count()).toEqual(1); expect(todoToggleSpy.calls.count()).toEqual(1);
}) });
}); });
}).call(this); }).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