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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
0711ebbd
Commit
0711ebbd
authored
Jan 23, 2018
by
Winnie Hellmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use restore() instead of reset() for removing axios MockAdapter
parent
4dc42845
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
15 additions
and
15 deletions
+15
-15
doc/development/fe_guide/axios.md
doc/development/fe_guide/axios.md
+1
-1
spec/javascripts/blob/notebook/index_spec.js
spec/javascripts/blob/notebook/index_spec.js
+3
-3
spec/javascripts/boards/board_card_spec.js
spec/javascripts/boards/board_card_spec.js
+1
-1
spec/javascripts/boards/board_list_spec.js
spec/javascripts/boards/board_list_spec.js
+1
-1
spec/javascripts/boards/board_new_issue_spec.js
spec/javascripts/boards/board_new_issue_spec.js
+1
-1
spec/javascripts/boards/boards_store_spec.js
spec/javascripts/boards/boards_store_spec.js
+1
-1
spec/javascripts/boards/list_spec.js
spec/javascripts/boards/list_spec.js
+1
-1
spec/javascripts/issue_show/components/app_spec.js
spec/javascripts/issue_show/components/app_spec.js
+1
-1
spec/javascripts/jobs/job_details_mediator_spec.js
spec/javascripts/jobs/job_details_mediator_spec.js
+4
-4
spec/javascripts/monitoring/dashboard_spec.js
spec/javascripts/monitoring/dashboard_spec.js
+1
-1
No files found.
doc/development/fe_guide/axios.md
View file @
0711ebbd
...
@@ -50,7 +50,7 @@ To help us mock the responses we need we use [axios-mock-adapter][axios-mock-ada
...
@@ -50,7 +50,7 @@ To help us mock the responses we need we use [axios-mock-adapter][axios-mock-ada
});
});
afterEach
(()
=>
{
afterEach
(()
=>
{
mock
.
res
et
();
mock
.
res
tore
();
});
});
```
```
...
...
spec/javascripts/blob/notebook/index_spec.js
View file @
0711ebbd
...
@@ -45,7 +45,7 @@ describe('iPython notebook renderer', () => {
...
@@ -45,7 +45,7 @@ describe('iPython notebook renderer', () => {
});
});
afterEach
(()
=>
{
afterEach
(()
=>
{
mock
.
res
et
();
mock
.
res
tore
();
});
});
it
(
'
does not show loading icon
'
,
()
=>
{
it
(
'
does not show loading icon
'
,
()
=>
{
...
@@ -96,7 +96,7 @@ describe('iPython notebook renderer', () => {
...
@@ -96,7 +96,7 @@ describe('iPython notebook renderer', () => {
});
});
afterEach
(()
=>
{
afterEach
(()
=>
{
mock
.
res
et
();
mock
.
res
tore
();
});
});
it
(
'
does not show loading icon
'
,
()
=>
{
it
(
'
does not show loading icon
'
,
()
=>
{
...
@@ -127,7 +127,7 @@ describe('iPython notebook renderer', () => {
...
@@ -127,7 +127,7 @@ describe('iPython notebook renderer', () => {
});
});
afterEach
(()
=>
{
afterEach
(()
=>
{
mock
.
res
et
();
mock
.
res
tore
();
});
});
it
(
'
does not show loading icon
'
,
()
=>
{
it
(
'
does not show loading icon
'
,
()
=>
{
...
...
spec/javascripts/boards/board_card_spec.js
View file @
0711ebbd
...
@@ -55,7 +55,7 @@ describe('Board card', () => {
...
@@ -55,7 +55,7 @@ describe('Board card', () => {
});
});
afterEach
(()
=>
{
afterEach
(()
=>
{
mock
.
res
et
();
mock
.
res
tore
();
});
});
it
(
'
returns false when detailIssue is empty
'
,
()
=>
{
it
(
'
returns false when detailIssue is empty
'
,
()
=>
{
...
...
spec/javascripts/boards/board_list_spec.js
View file @
0711ebbd
...
@@ -60,7 +60,7 @@ describe('Board list component', () => {
...
@@ -60,7 +60,7 @@ describe('Board list component', () => {
});
});
afterEach
(()
=>
{
afterEach
(()
=>
{
mock
.
res
et
();
mock
.
res
tore
();
});
});
it
(
'
renders component
'
,
()
=>
{
it
(
'
renders component
'
,
()
=>
{
...
...
spec/javascripts/boards/board_new_issue_spec.js
View file @
0711ebbd
...
@@ -58,7 +58,7 @@ describe('Issue boards new issue form', () => {
...
@@ -58,7 +58,7 @@ describe('Issue boards new issue form', () => {
afterEach
(()
=>
{
afterEach
(()
=>
{
vm
.
$destroy
();
vm
.
$destroy
();
mock
.
res
et
();
mock
.
res
tore
();
});
});
it
(
'
calls submit if submit button is clicked
'
,
(
done
)
=>
{
it
(
'
calls submit if submit button is clicked
'
,
(
done
)
=>
{
...
...
spec/javascripts/boards/boards_store_spec.js
View file @
0711ebbd
...
@@ -35,7 +35,7 @@ describe('Store', () => {
...
@@ -35,7 +35,7 @@ describe('Store', () => {
});
});
afterEach
(()
=>
{
afterEach
(()
=>
{
mock
.
res
et
();
mock
.
res
tore
();
});
});
it
(
'
starts with a blank state
'
,
()
=>
{
it
(
'
starts with a blank state
'
,
()
=>
{
...
...
spec/javascripts/boards/list_spec.js
View file @
0711ebbd
...
@@ -30,7 +30,7 @@ describe('List model', () => {
...
@@ -30,7 +30,7 @@ describe('List model', () => {
});
});
afterEach
(()
=>
{
afterEach
(()
=>
{
mock
.
res
et
();
mock
.
res
tore
();
});
});
it
(
'
gets issues when created
'
,
(
done
)
=>
{
it
(
'
gets issues when created
'
,
(
done
)
=>
{
...
...
spec/javascripts/issue_show/components/app_spec.js
View file @
0711ebbd
...
@@ -59,7 +59,7 @@ describe('Issuable output', () => {
...
@@ -59,7 +59,7 @@ describe('Issuable output', () => {
});
});
afterEach
(()
=>
{
afterEach
(()
=>
{
mock
.
res
et
();
mock
.
res
tore
();
realtimeRequestCount
=
0
;
realtimeRequestCount
=
0
;
vm
.
poll
.
stop
();
vm
.
poll
.
stop
();
...
...
spec/javascripts/jobs/job_details_mediator_spec.js
View file @
0711ebbd
...
@@ -12,6 +12,10 @@ describe('JobMediator', () => {
...
@@ -12,6 +12,10 @@ describe('JobMediator', () => {
mock
=
new
MockAdapter
(
axios
);
mock
=
new
MockAdapter
(
axios
);
});
});
afterEach
(()
=>
{
mock
.
restore
();
});
it
(
'
should set defaults
'
,
()
=>
{
it
(
'
should set defaults
'
,
()
=>
{
expect
(
mediator
.
store
).
toBeDefined
();
expect
(
mediator
.
store
).
toBeDefined
();
expect
(
mediator
.
service
).
toBeDefined
();
expect
(
mediator
.
service
).
toBeDefined
();
...
@@ -24,10 +28,6 @@ describe('JobMediator', () => {
...
@@ -24,10 +28,6 @@ describe('JobMediator', () => {
mock
.
onGet
().
reply
(
200
,
job
,
{});
mock
.
onGet
().
reply
(
200
,
job
,
{});
});
});
afterEach
(()
=>
{
mock
.
restore
();
});
it
(
'
should store received data
'
,
(
done
)
=>
{
it
(
'
should store received data
'
,
(
done
)
=>
{
mediator
.
fetchJob
();
mediator
.
fetchJob
();
setTimeout
(()
=>
{
setTimeout
(()
=>
{
...
...
spec/javascripts/monitoring/dashboard_spec.js
View file @
0711ebbd
...
@@ -38,7 +38,7 @@ describe('Dashboard', () => {
...
@@ -38,7 +38,7 @@ describe('Dashboard', () => {
});
});
afterEach
(()
=>
{
afterEach
(()
=>
{
mock
.
res
et
();
mock
.
res
tore
();
});
});
it
(
'
shows up a loading state
'
,
(
done
)
=>
{
it
(
'
shows up a loading state
'
,
(
done
)
=>
{
...
...
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