BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
0d540530
Commit
0d540530
authored
May 05, 2017
by
Clement Ho
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Standardize jasmine test describe block names that test specific methods
parent
9e041f21
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
26 additions
and
26 deletions
+26
-26
bind_in_out_spec.js
spec/javascripts/behaviors/bind_in_out_spec.js
+6
-6
target_branch_dropdown_spec.js
spec/javascripts/blob/target_branch_dropdown_spec.js
+2
-2
gl_form_spec.js
spec/javascripts/gl_form_spec.js
+3
-3
class_spec_helper_spec.js
spec/javascripts/helpers/class_spec_helper_spec.js
+1
-1
line_highlighter_spec.js
spec/javascripts/line_highlighter_spec.js
+4
-4
merge_request_tabs_spec.js
spec/javascripts/merge_request_tabs_spec.js
+5
-5
shortcuts_issuable_spec.js
spec/javascripts/shortcuts_issuable_spec.js
+1
-1
version_check_image_spec.js
spec/javascripts/version_check_image_spec.js
+1
-1
visibility_select_spec.js
spec/javascripts/visibility_select_spec.js
+3
-3
No files found.
spec/javascripts/behaviors/bind_in_out_spec.js
View file @
0d540530
...
...
@@ -2,7 +2,7 @@ import BindInOut from '~/behaviors/bind_in_out';
import
ClassSpecHelper
from
'../helpers/class_spec_helper'
;
describe
(
'BindInOut'
,
function
()
{
describe
(
'
.
constructor'
,
function
()
{
describe
(
'constructor'
,
function
()
{
beforeEach
(
function
()
{
this
.
in
=
{};
this
.
out
=
{};
...
...
@@ -53,7 +53,7 @@ describe('BindInOut', function () {
});
});
describe
(
'
.
addEvents'
,
function
()
{
describe
(
'addEvents'
,
function
()
{
beforeEach
(
function
()
{
this
.
in
=
jasmine
.
createSpyObj
(
'in'
,
[
'addEventListener'
]);
...
...
@@ -79,7 +79,7 @@ describe('BindInOut', function () {
});
});
describe
(
'
.
updateOut'
,
function
()
{
describe
(
'updateOut'
,
function
()
{
beforeEach
(
function
()
{
this
.
in
=
{
value
:
'the-value'
};
this
.
out
=
{
textContent
:
'not-the-value'
};
...
...
@@ -98,7 +98,7 @@ describe('BindInOut', function () {
});
});
describe
(
'
.
removeEvents'
,
function
()
{
describe
(
'removeEvents'
,
function
()
{
beforeEach
(
function
()
{
this
.
in
=
jasmine
.
createSpyObj
(
'in'
,
[
'removeEventListener'
]);
this
.
updateOut
=
()
=>
{};
...
...
@@ -122,7 +122,7 @@ describe('BindInOut', function () {
});
});
describe
(
'
.
initAll'
,
function
()
{
describe
(
'initAll'
,
function
()
{
beforeEach
(
function
()
{
this
.
ins
=
[
0
,
1
,
2
];
this
.
instances
=
[];
...
...
@@ -153,7 +153,7 @@ describe('BindInOut', function () {
});
});
describe
(
'
.
init'
,
function
()
{
describe
(
'init'
,
function
()
{
beforeEach
(
function
()
{
spyOn
(
BindInOut
.
prototype
,
'addEvents'
).
and
.
callFake
(
function
()
{
return
this
;
});
spyOn
(
BindInOut
.
prototype
,
'updateOut'
).
and
.
callFake
(
function
()
{
return
this
;
});
...
...
spec/javascripts/blob/target_branch_dropdown_spec.js
View file @
0d540530
...
...
@@ -63,7 +63,7 @@ describe('TargetBranchDropdown', () => {
expect
(
'change.branch'
).
toHaveBeenTriggeredOn
(
dropdown
.
$dropdown
);
});
describe
(
'
#
dropdownData'
,
()
=>
{
describe
(
'dropdownData'
,
()
=>
{
it
(
'cache the refs'
,
()
=>
{
const
refs
=
dropdown
.
cachedRefs
;
dropdown
.
cachedRefs
=
null
;
...
...
@@ -88,7 +88,7 @@ describe('TargetBranchDropdown', () => {
});
});
describe
(
'
#
setNewBranch'
,
()
=>
{
describe
(
'setNewBranch'
,
()
=>
{
it
(
'adds the new branch and select it'
,
()
=>
{
const
branchName
=
'new_branch'
;
...
...
spec/javascripts/gl_form_spec.js
View file @
0d540530
...
...
@@ -32,7 +32,7 @@ describe('GLForm', () => {
});
});
describe
(
'
.
setupAutosize'
,
()
=>
{
describe
(
'setupAutosize'
,
()
=>
{
beforeEach
((
done
)
=>
{
this
.
glForm
.
setupAutosize
();
setTimeout
(()
=>
{
...
...
@@ -59,7 +59,7 @@ describe('GLForm', () => {
});
});
describe
(
'
.
setHeightData'
,
()
=>
{
describe
(
'setHeightData'
,
()
=>
{
beforeEach
(()
=>
{
spyOn
(
$
.
prototype
,
'data'
);
spyOn
(
$
.
prototype
,
'outerHeight'
).
and
.
returnValue
(
200
);
...
...
@@ -75,7 +75,7 @@ describe('GLForm', () => {
});
});
describe
(
'
.
destroyAutosize'
,
()
=>
{
describe
(
'destroyAutosize'
,
()
=>
{
describe
(
'when called'
,
()
=>
{
beforeEach
(()
=>
{
spyOn
(
$
.
prototype
,
'data'
);
...
...
spec/javascripts/helpers/class_spec_helper_spec.js
View file @
0d540530
...
...
@@ -3,7 +3,7 @@
require
(
'./class_spec_helper'
);
describe
(
'ClassSpecHelper'
,
()
=>
{
describe
(
'
.
itShouldBeAStaticMethod'
,
function
()
{
describe
(
'itShouldBeAStaticMethod'
,
function
()
{
beforeEach
(()
=>
{
class
TestClass
{
instanceMethod
()
{
this
.
prop
=
'val'
;
}
...
...
spec/javascripts/line_highlighter_spec.js
View file @
0d540530
...
...
@@ -58,7 +58,7 @@ require('~/line_highlighter');
return
expect
(
func
).
not
.
toThrow
();
});
});
describe
(
'
#
clickHandler'
,
function
()
{
describe
(
'clickHandler'
,
function
()
{
it
(
'handles clicking on a child icon element'
,
function
()
{
var
spy
;
spy
=
spyOn
(
this
[
"class"
],
'setHash'
).
and
.
callThrough
();
...
...
@@ -176,7 +176,7 @@ require('~/line_highlighter');
});
});
});
describe
(
'
#
hashToRange'
,
function
()
{
describe
(
'hashToRange'
,
function
()
{
beforeEach
(
function
()
{
return
this
.
subject
=
this
[
"class"
].
hashToRange
;
});
...
...
@@ -190,7 +190,7 @@ require('~/line_highlighter');
return
expect
(
this
.
subject
(
'#foo'
)).
toEqual
([
null
,
null
]);
});
});
describe
(
'
#
highlightLine'
,
function
()
{
describe
(
'highlightLine'
,
function
()
{
beforeEach
(
function
()
{
return
this
.
subject
=
this
[
"class"
].
highlightLine
;
});
...
...
@@ -203,7 +203,7 @@ require('~/line_highlighter');
return
expect
(
$
(
'#LC13'
)).
toHaveClass
(
this
.
css
);
});
});
return
describe
(
'
#
setHash'
,
function
()
{
return
describe
(
'setHash'
,
function
()
{
beforeEach
(
function
()
{
return
this
.
subject
=
this
[
"class"
].
setHash
;
});
...
...
spec/javascripts/merge_request_tabs_spec.js
View file @
0d540530
...
...
@@ -47,7 +47,7 @@ require('vendor/jquery.scrollTo');
this
.
class
.
destroyPipelinesView
();
});
describe
(
'
#
activateTab'
,
function
()
{
describe
(
'activateTab'
,
function
()
{
beforeEach
(
function
()
{
spyOn
(
$
,
'ajax'
).
and
.
callFake
(
function
()
{});
loadFixtures
(
'merge_requests/merge_request_with_task_list.html.raw'
);
...
...
@@ -71,7 +71,7 @@ require('vendor/jquery.scrollTo');
});
});
describe
(
'
#
opensInNewTab'
,
function
()
{
describe
(
'opensInNewTab'
,
function
()
{
var
tabUrl
;
var
windowTarget
=
'_blank'
;
...
...
@@ -152,7 +152,7 @@ require('vendor/jquery.scrollTo');
});
});
describe
(
'
#
setCurrentAction'
,
function
()
{
describe
(
'setCurrentAction'
,
function
()
{
beforeEach
(
function
()
{
spyOn
(
$
,
'ajax'
).
and
.
callFake
(
function
()
{});
this
.
subject
=
this
.
class
.
setCurrentAction
;
...
...
@@ -221,7 +221,7 @@ require('vendor/jquery.scrollTo');
});
});
describe
(
'
#
tabShown'
,
()
=>
{
describe
(
'tabShown'
,
()
=>
{
beforeEach
(
function
()
{
spyOn
(
$
,
'ajax'
).
and
.
callFake
(
function
(
options
)
{
options
.
success
({
html
:
''
});
...
...
@@ -281,7 +281,7 @@ require('vendor/jquery.scrollTo');
});
});
describe
(
'
#
loadDiff'
,
function
()
{
describe
(
'loadDiff'
,
function
()
{
it
(
'requires an absolute pathname'
,
function
()
{
spyOn
(
$
,
'ajax'
).
and
.
callFake
(
function
(
options
)
{
expect
(
options
.
url
).
toEqual
(
'/foo/bar/merge_requests/1/diffs.json'
);
...
...
spec/javascripts/shortcuts_issuable_spec.js
View file @
0d540530
...
...
@@ -13,7 +13,7 @@ require('~/shortcuts_issuable');
document
.
querySelector
(
'.js-new-note-form'
).
classList
.
add
(
'js-main-target-form'
);
this
.
shortcut
=
new
ShortcutsIssuable
();
});
describe
(
'
#
replyWithSelectedText'
,
function
()
{
describe
(
'replyWithSelectedText'
,
function
()
{
var
stubSelection
;
// Stub window.gl.utils.getSelectedFragment to return a node with the provided HTML.
stubSelection
=
function
(
html
)
{
...
...
spec/javascripts/version_check_image_spec.js
View file @
0d540530
...
...
@@ -3,7 +3,7 @@ const VersionCheckImage = require('~/version_check_image');
require
(
'jquery'
);
describe
(
'VersionCheckImage'
,
function
()
{
describe
(
'
.
bindErrorEvent'
,
function
()
{
describe
(
'bindErrorEvent'
,
function
()
{
ClassSpecHelper
.
itShouldBeAStaticMethod
(
VersionCheckImage
,
'bindErrorEvent'
);
beforeEach
(
function
()
{
...
...
spec/javascripts/visibility_select_spec.js
View file @
0d540530
...
...
@@ -22,7 +22,7 @@ require('~/visibility_select');
spyOn
(
Element
.
prototype
,
'querySelector'
).
and
.
callFake
(
selector
=>
mockElements
[
selector
]);
});
describe
(
'
#
constructor'
,
function
()
{
describe
(
'constructor'
,
function
()
{
beforeEach
(
function
()
{
this
.
visibilitySelect
=
new
VisibilitySelect
(
mockElements
.
container
);
});
...
...
@@ -48,7 +48,7 @@ require('~/visibility_select');
});
});
describe
(
'
#
init'
,
function
()
{
describe
(
'init'
,
function
()
{
describe
(
'if there is a select'
,
function
()
{
beforeEach
(
function
()
{
this
.
visibilitySelect
=
new
VisibilitySelect
(
mockElements
.
container
);
...
...
@@ -85,7 +85,7 @@ require('~/visibility_select');
});
});
describe
(
'
#
updateHelpText'
,
function
()
{
describe
(
'updateHelpText'
,
function
()
{
beforeEach
(
function
()
{
this
.
visibilitySelect
=
new
VisibilitySelect
(
mockElements
.
container
);
this
.
visibilitySelect
.
init
();
...
...
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