Commit 2294e860 authored by Phil Hughes's avatar Phil Hughes

Merge branch 'remove_var_from_merge_request_tabs_spec_js' into 'master'

Remove var from merge request tabs spec js

See merge request gitlab-org/gitlab!20087
parents a92540aa f92f6aff
---
title: Remove var from merge_request_tabs_spec.js
merge_request: 20087
author: Lee Tickett
type: other
/* eslint-disable no-var */
import $ from 'jquery'; import $ from 'jquery';
import MockAdapter from 'axios-mock-adapter'; import MockAdapter from 'axios-mock-adapter';
import axios from '~/lib/utils/axios_utils'; import axios from '~/lib/utils/axios_utils';
...@@ -11,9 +10,9 @@ import initMrPage from './helpers/init_vue_mr_page_helper'; ...@@ -11,9 +10,9 @@ import initMrPage from './helpers/init_vue_mr_page_helper';
describe('MergeRequestTabs', function() { describe('MergeRequestTabs', function() {
let mrPageMock; let mrPageMock;
var stubLocation = {}; const stubLocation = {};
var setLocation = function(stubs) { const setLocation = function(stubs) {
var defaults = { const defaults = {
pathname: '', pathname: '',
search: '', search: '',
hash: '', hash: '',
...@@ -44,9 +43,9 @@ describe('MergeRequestTabs', function() { ...@@ -44,9 +43,9 @@ describe('MergeRequestTabs', function() {
}); });
describe('opensInNewTab', function() { describe('opensInNewTab', function() {
var tabUrl; const windowTarget = '_blank';
var windowTarget = '_blank';
let clickTabParams; let clickTabParams;
let tabUrl;
beforeEach(function() { beforeEach(function() {
loadFixtures('merge_requests/merge_request_with_task_list.html'); loadFixtures('merge_requests/merge_request_with_task_list.html');
...@@ -193,11 +192,10 @@ describe('MergeRequestTabs', function() { ...@@ -193,11 +192,10 @@ describe('MergeRequestTabs', function() {
}); });
it('replaces the current history state', function() { it('replaces the current history state', function() {
var newState;
setLocation({ setLocation({
pathname: '/foo/bar/merge_requests/1', pathname: '/foo/bar/merge_requests/1',
}); });
newState = this.subject('commits'); const newState = this.subject('commits');
expect(this.spies.history).toHaveBeenCalledWith( expect(this.spies.history).toHaveBeenCalledWith(
{ {
......
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