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
0fd203ba
Commit
0fd203ba
authored
Oct 09, 2018
by
Johann Hubert Sonntagbauer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
enable jasmine/no-promise-without-done-fail
parent
1dfecf3e
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
17 additions
and
19 deletions
+17
-19
spec/javascripts/.eslintrc.yml
spec/javascripts/.eslintrc.yml
+0
-1
spec/javascripts/boards/components/board_spec.js
spec/javascripts/boards/components/board_spec.js
+1
-1
spec/javascripts/lib/utils/common_utils_spec.js
spec/javascripts/lib/utils/common_utils_spec.js
+6
-7
spec/javascripts/pipelines/pipelines_spec.js
spec/javascripts/pipelines/pipelines_spec.js
+1
-1
spec/javascripts/projects/gke_cluster_dropdowns/components/gke_machine_type_dropdown_spec.js
...er_dropdowns/components/gke_machine_type_dropdown_spec.js
+2
-2
spec/javascripts/projects/gke_cluster_dropdowns/components/gke_project_id_dropdown_spec.js
...ster_dropdowns/components/gke_project_id_dropdown_spec.js
+5
-5
spec/javascripts/projects/gke_cluster_dropdowns/components/gke_zone_dropdown_spec.js
...ke_cluster_dropdowns/components/gke_zone_dropdown_spec.js
+2
-2
No files found.
spec/javascripts/.eslintrc.yml
View file @
0fd203ba
...
@@ -37,5 +37,4 @@ rules:
...
@@ -37,5 +37,4 @@ rules:
-
'
fixtures/blob'
-
'
fixtures/blob'
# Temporarily disabled to facilitate an upgrade to eslint-plugin-jasmine
# Temporarily disabled to facilitate an upgrade to eslint-plugin-jasmine
jasmine/new-line-before-expect
:
off
jasmine/new-line-before-expect
:
off
jasmine/no-promise-without-done-fail
:
off
jasmine/prefer-toHaveBeenCalledWith
:
off
jasmine/prefer-toHaveBeenCalledWith
:
off
spec/javascripts/boards/components/board_spec.js
View file @
0fd203ba
...
@@ -112,6 +112,6 @@ describe('Board component', () => {
...
@@ -112,6 +112,6 @@ describe('Board component', () => {
).
toBe
(
true
);
).
toBe
(
true
);
done
();
done
();
});
})
.
catch
(
done
.
fail
)
;
});
});
});
});
spec/javascripts/lib/utils/common_utils_spec.js
View file @
0fd203ba
/* eslint-disable promise/catch-or-return */
import
axios
from
'
~/lib/utils/axios_utils
'
;
import
axios
from
'
~/lib/utils/axios_utils
'
;
import
*
as
commonUtils
from
'
~/lib/utils/common_utils
'
;
import
*
as
commonUtils
from
'
~/lib/utils/common_utils
'
;
import
MockAdapter
from
'
axios-mock-adapter
'
;
import
MockAdapter
from
'
axios-mock-adapter
'
;
...
@@ -360,10 +359,10 @@ describe('common_utils', () => {
...
@@ -360,10 +359,10 @@ describe('common_utils', () => {
}).
then
((
resp
)
=>
{
}).
then
((
resp
)
=>
{
stop
(
resp
);
stop
(
resp
);
})
})
)).
then
((
respBackoff
)
=>
{
)
.
catch
(
done
.
fail
)
).
then
((
respBackoff
)
=>
{
expect
(
respBackoff
).
toBe
(
expectedResponseValue
);
expect
(
respBackoff
).
toBe
(
expectedResponseValue
);
done
();
done
();
});
})
.
catch
(
done
.
fail
)
;
});
});
it
(
'
catches the rejected promise from the callback
'
,
(
done
)
=>
{
it
(
'
catches the rejected promise from the callback
'
,
(
done
)
=>
{
...
@@ -394,12 +393,12 @@ describe('common_utils', () => {
...
@@ -394,12 +393,12 @@ describe('common_utils', () => {
stop
(
resp
);
stop
(
resp
);
}
}
})
})
)).
then
((
respBackoff
)
=>
{
)
.
catch
(
done
.
fail
)
).
then
((
respBackoff
)
=>
{
const
timeouts
=
window
.
setTimeout
.
calls
.
allArgs
().
map
(([,
timeout
])
=>
timeout
);
const
timeouts
=
window
.
setTimeout
.
calls
.
allArgs
().
map
(([,
timeout
])
=>
timeout
);
expect
(
timeouts
).
toEqual
([
2000
,
4000
]);
expect
(
timeouts
).
toEqual
([
2000
,
4000
]);
expect
(
respBackoff
).
toBe
(
expectedResponseValue
);
expect
(
respBackoff
).
toBe
(
expectedResponseValue
);
done
();
done
();
});
})
.
catch
(
done
.
fail
)
;
});
});
it
(
'
rejects the backOff promise after timing out
'
,
(
done
)
=>
{
it
(
'
rejects the backOff promise after timing out
'
,
(
done
)
=>
{
...
@@ -460,7 +459,7 @@ describe('common_utils', () => {
...
@@ -460,7 +459,7 @@ describe('common_utils', () => {
commonUtils
.
createOverlayIcon
(
faviconDataUrl
,
overlayDataUrl
).
then
((
url
)
=>
{
commonUtils
.
createOverlayIcon
(
faviconDataUrl
,
overlayDataUrl
).
then
((
url
)
=>
{
expect
(
url
).
toEqual
(
faviconWithOverlayDataUrl
);
expect
(
url
).
toEqual
(
faviconWithOverlayDataUrl
);
done
();
done
();
});
})
.
catch
(
done
.
fail
)
;
});
});
});
});
...
@@ -480,7 +479,7 @@ describe('common_utils', () => {
...
@@ -480,7 +479,7 @@ describe('common_utils', () => {
commonUtils
.
setFaviconOverlay
(
overlayDataUrl
).
then
(()
=>
{
commonUtils
.
setFaviconOverlay
(
overlayDataUrl
).
then
(()
=>
{
expect
(
document
.
getElementById
(
'
favicon
'
).
getAttribute
(
'
href
'
)).
toEqual
(
faviconWithOverlayDataUrl
);
expect
(
document
.
getElementById
(
'
favicon
'
).
getAttribute
(
'
href
'
)).
toEqual
(
faviconWithOverlayDataUrl
);
done
();
done
();
});
})
.
catch
(
done
.
fail
)
;
});
});
});
});
...
...
spec/javascripts/pipelines/pipelines_spec.js
View file @
0fd203ba
...
@@ -719,7 +719,7 @@ describe('Pipelines', () => {
...
@@ -719,7 +719,7 @@ describe('Pipelines', () => {
expect
(
vm
.
poll
.
restart
).
toHaveBeenCalled
();
expect
(
vm
.
poll
.
restart
).
toHaveBeenCalled
();
done
();
done
();
},
0
);
},
0
);
});
})
.
catch
(
done
.
fail
)
;
},
0
);
},
0
);
});
});
});
});
...
...
spec/javascripts/projects/gke_cluster_dropdowns/components/gke_machine_type_dropdown_spec.js
View file @
0fd203ba
...
@@ -96,8 +96,8 @@ describe('GkeMachineTypeDropdown', () => {
...
@@ -96,8 +96,8 @@ describe('GkeMachineTypeDropdown', () => {
return
vm
.
$nextTick
().
then
(()
=>
{
return
vm
.
$nextTick
().
then
(()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
input
'
).
value
).
toBe
(
selectedMachineTypeMock
);
expect
(
vm
.
$el
.
querySelector
(
'
input
'
).
value
).
toBe
(
selectedMachineTypeMock
);
done
();
done
();
});
})
.
catch
(
done
.
fail
)
;
});
})
.
catch
(
done
.
fail
)
;
});
});
});
});
});
});
spec/javascripts/projects/gke_cluster_dropdowns/components/gke_project_id_dropdown_spec.js
View file @
0fd203ba
...
@@ -57,13 +57,13 @@ describe('GkeProjectIdDropdown', () => {
...
@@ -57,13 +57,13 @@ describe('GkeProjectIdDropdown', () => {
expect
(
vm
.
toggleText
).
toBe
(
LABELS
.
DEFAULT
);
expect
(
vm
.
toggleText
).
toBe
(
LABELS
.
DEFAULT
);
done
();
done
();
}));
})
.
catch
(
done
.
fail
)
);
it
(
'
returns project name if project selected
'
,
done
=>
it
(
'
returns project name if project selected
'
,
done
=>
vm
.
$nextTick
().
then
(()
=>
{
vm
.
$nextTick
().
then
(()
=>
{
expect
(
vm
.
toggleText
).
toBe
(
selectedProjectMock
.
name
);
expect
(
vm
.
toggleText
).
toBe
(
selectedProjectMock
.
name
);
done
();
done
();
}));
})
.
catch
(
done
.
fail
)
);
it
(
'
returns empty toggle text
'
,
done
=>
it
(
'
returns empty toggle text
'
,
done
=>
vm
.
$nextTick
().
then
(()
=>
{
vm
.
$nextTick
().
then
(()
=>
{
...
@@ -72,7 +72,7 @@ describe('GkeProjectIdDropdown', () => {
...
@@ -72,7 +72,7 @@ describe('GkeProjectIdDropdown', () => {
expect
(
vm
.
toggleText
).
toBe
(
LABELS
.
EMPTY
);
expect
(
vm
.
toggleText
).
toBe
(
LABELS
.
EMPTY
);
done
();
done
();
}));
})
.
catch
(
done
.
fail
)
);
});
});
describe
(
'
selectItem
'
,
()
=>
{
describe
(
'
selectItem
'
,
()
=>
{
...
@@ -85,8 +85,8 @@ describe('GkeProjectIdDropdown', () => {
...
@@ -85,8 +85,8 @@ describe('GkeProjectIdDropdown', () => {
return
vm
.
$nextTick
().
then
(()
=>
{
return
vm
.
$nextTick
().
then
(()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
input
'
).
value
).
toBe
(
selectedProjectMock
.
projectId
);
expect
(
vm
.
$el
.
querySelector
(
'
input
'
).
value
).
toBe
(
selectedProjectMock
.
projectId
);
done
();
done
();
});
})
.
catch
(
done
.
fail
)
;
});
})
.
catch
(
done
.
fail
)
;
});
});
});
});
});
});
spec/javascripts/projects/gke_cluster_dropdowns/components/gke_zone_dropdown_spec.js
View file @
0fd203ba
...
@@ -81,8 +81,8 @@ describe('GkeZoneDropdown', () => {
...
@@ -81,8 +81,8 @@ describe('GkeZoneDropdown', () => {
return
vm
.
$nextTick
().
then
(()
=>
{
return
vm
.
$nextTick
().
then
(()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
input
'
).
value
).
toBe
(
selectedZoneMock
);
expect
(
vm
.
$el
.
querySelector
(
'
input
'
).
value
).
toBe
(
selectedZoneMock
);
done
();
done
();
});
})
.
catch
(
done
.
fail
)
;
});
})
.
catch
(
done
.
fail
)
;
});
});
});
});
});
});
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