Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
1278b5ce
Commit
1278b5ce
authored
Feb 07, 2017
by
Kushal Pandya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ESLint: remove `expect()` from `beforeEach()`
parent
3633e04f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
4 deletions
+18
-4
spec/javascripts/merge_request_tabs_spec.js
spec/javascripts/merge_request_tabs_spec.js
+18
-4
No files found.
spec/javascripts/merge_request_tabs_spec.js
View file @
1278b5ce
...
...
@@ -62,17 +62,21 @@ require('vendor/jquery.scrollTo');
});
});
describe
(
'
#opensInNewTab
'
,
function
()
{
var
commitsLink
;
var
tabUrl
;
beforeEach
(
function
()
{
co
nst
co
mmitsLink
=
'
.commits-tab li a
'
;
const
tabUrl
=
$
(
commitsLink
).
attr
(
'
href
'
);
commitsLink
=
'
.commits-tab li a
'
;
tabUrl
=
$
(
commitsLink
).
attr
(
'
href
'
);
spyOn
(
$
.
fn
,
'
attr
'
).
and
.
returnValue
(
tabUrl
);
});
it
(
'
opens page tab in a new browser tab with Ctrl+Click - Windows/Linux
'
,
function
()
{
spyOn
(
window
,
'
open
'
).
and
.
callFake
(
function
(
url
,
name
)
{
expect
(
url
).
toEqual
(
tabUrl
);
expect
(
name
).
toEqual
(
'
_blank
'
);
});
});
it
(
'
opens page tab in a new browser tab with Ctrl+Click - Windows/Linux
'
,
function
()
{
this
.
class
.
clickTab
({
metaKey
:
false
,
ctrlKey
:
true
,
...
...
@@ -81,6 +85,11 @@ require('vendor/jquery.scrollTo');
});
});
it
(
'
opens page tab in a new browser tab with Cmd+Click - Mac
'
,
function
()
{
spyOn
(
window
,
'
open
'
).
and
.
callFake
(
function
(
url
,
name
)
{
expect
(
url
).
toEqual
(
tabUrl
);
expect
(
name
).
toEqual
(
'
_blank
'
);
});
this
.
class
.
clickTab
({
metaKey
:
true
,
ctrlKey
:
false
,
...
...
@@ -89,6 +98,11 @@ require('vendor/jquery.scrollTo');
});
});
it
(
'
opens page tab in a new browser tab with Middle-click - Mac/PC
'
,
function
()
{
spyOn
(
window
,
'
open
'
).
and
.
callFake
(
function
(
url
,
name
)
{
expect
(
url
).
toEqual
(
tabUrl
);
expect
(
name
).
toEqual
(
'
_blank
'
);
});
this
.
class
.
clickTab
({
metaKey
:
false
,
ctrlKey
:
false
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment