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
325fb305
Commit
325fb305
authored
Dec 23, 2020
by
Lukas Eipert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Run prettier on 31 files - 72 of 73
Part of our prettier migration; changing the arrow-parens style.
parent
e37a6d7a
Changes
32
Hide whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
91 additions
and
124 deletions
+91
-124
.prettierignore
.prettierignore
+0
-33
spec/frontend/vue_shared/components/rich_content_editor/editor_service_spec.js
...red/components/rich_content_editor/editor_service_spec.js
+1
-1
spec/frontend/vue_shared/components/rich_content_editor/modals/add_image/upload_image_tab_spec.js
..._content_editor/modals/add_image/upload_image_tab_spec.js
+1
-1
spec/frontend/vue_shared/components/rich_content_editor/modals/insert_video_modal_spec.js
...nts/rich_content_editor/modals/insert_video_modal_spec.js
+1
-1
spec/frontend/vue_shared/components/rich_content_editor/services/build_html_to_markdown_renderer_spec.js
...t_editor/services/build_html_to_markdown_renderer_spec.js
+3
-3
spec/frontend/vue_shared/components/rich_content_editor/services/renderers/mock_data.js
...nents/rich_content_editor/services/renderers/mock_data.js
+4
-4
spec/frontend/vue_shared/components/rich_content_editor/services/renderers/render_identifier_instance_text_spec.js
...ervices/renderers/render_identifier_instance_text_spec.js
+1
-1
spec/frontend/vue_shared/components/rich_content_editor/services/renderers/render_identifier_paragraph_spec.js
...or/services/renderers/render_identifier_paragraph_spec.js
+1
-1
spec/frontend/vue_shared/components/rich_content_editor/toolbar_item_spec.js
...hared/components/rich_content_editor/toolbar_item_spec.js
+1
-1
spec/frontend/vue_shared/components/security_reports/help_icon_spec.js
.../vue_shared/components/security_reports/help_icon_spec.js
+1
-1
spec/frontend/vue_shared/components/security_reports/security_summary_spec.js
...ared/components/security_reports/security_summary_spec.js
+2
-2
spec/frontend/vue_shared/components/sidebar/collapsed_grouped_date_picker_spec.js
.../components/sidebar/collapsed_grouped_date_picker_spec.js
+4
-4
spec/frontend/vue_shared/components/sidebar/labels_select/base_spec.js
.../vue_shared/components/sidebar/labels_select/base_spec.js
+1
-1
spec/frontend/vue_shared/components/sidebar/labels_select/dropdown_create_label_spec.js
...nents/sidebar/labels_select/dropdown_create_label_spec.js
+1
-1
spec/frontend/vue_shared/components/sidebar/labels_select/dropdown_value_collapsed_spec.js
...ts/sidebar/labels_select/dropdown_value_collapsed_spec.js
+3
-3
spec/frontend/vue_shared/components/sidebar/labels_select_vue/dropdown_contents_create_view_spec.js
...r/labels_select_vue/dropdown_contents_create_view_spec.js
+1
-1
spec/frontend/vue_shared/components/sidebar/labels_select_vue/store/actions_spec.js
...omponents/sidebar/labels_select_vue/store/actions_spec.js
+15
-15
spec/frontend/vue_shared/components/sidebar/labels_select_vue/store/mutations_spec.js
...ponents/sidebar/labels_select_vue/store/mutations_spec.js
+3
-3
spec/frontend/vue_shared/components/slot_switch_spec.js
spec/frontend/vue_shared/components/slot_switch_spec.js
+2
-2
spec/frontend/vue_shared/components/split_button_spec.js
spec/frontend/vue_shared/components/split_button_spec.js
+3
-3
spec/frontend/vue_shared/components/table_pagination_spec.js
spec/frontend/vue_shared/components/table_pagination_spec.js
+1
-1
spec/frontend/vue_shared/components/tabs/tab_spec.js
spec/frontend/vue_shared/components/tabs/tab_spec.js
+2
-2
spec/frontend/vue_shared/components/tooltip_on_truncate_spec.js
...rontend/vue_shared/components/tooltip_on_truncate_spec.js
+1
-1
spec/frontend/vue_shared/components/user_avatar/user_avatar_link_spec.js
...ue_shared/components/user_avatar/user_avatar_link_spec.js
+1
-1
spec/frontend/vue_shared/components/user_avatar/user_avatar_list_spec.js
...ue_shared/components/user_avatar/user_avatar_list_spec.js
+4
-4
spec/frontend/vue_shared/components/user_popover/user_popover_spec.js
...d/vue_shared/components/user_popover/user_popover_spec.js
+5
-5
spec/frontend/vue_shared/directives/validation_spec.js
spec/frontend/vue_shared/directives/validation_spec.js
+2
-2
spec/frontend/vue_shared/security_reports/components/security_report_download_dropdown_spec.js
...orts/components/security_report_download_dropdown_spec.js
+1
-1
spec/frontend/vue_shared/security_reports/security_reports_app_spec.js
.../vue_shared/security_reports/security_reports_app_spec.js
+8
-8
spec/frontend/vue_shared/security_reports/store/getters_spec.js
...rontend/vue_shared/security_reports/store/getters_spec.js
+1
-1
spec/frontend/vue_shared/security_reports/store/modules/sast/actions_spec.js
...hared/security_reports/store/modules/sast/actions_spec.js
+8
-8
spec/frontend/vue_shared/security_reports/store/modules/secret_detection/actions_spec.js
...ty_reports/store/modules/secret_detection/actions_spec.js
+8
-8
No files found.
.prettierignore
View file @
325fb305
...
...
@@ -2256,39 +2256,6 @@ spec/frontend/shared/popover_spec.js
spec/frontend/shortcuts_spec.js
spec/frontend/sidebar/assignee_title_spec.js
## wizardly-agnesi
spec/frontend/vue_shared/components/rich_content_editor/editor_service_spec.js
spec/frontend/vue_shared/components/rich_content_editor/modals/add_image/upload_image_tab_spec.js
spec/frontend/vue_shared/components/rich_content_editor/modals/insert_video_modal_spec.js
spec/frontend/vue_shared/components/rich_content_editor/services/build_html_to_markdown_renderer_spec.js
spec/frontend/vue_shared/components/rich_content_editor/services/renderers/mock_data.js
spec/frontend/vue_shared/components/rich_content_editor/services/renderers/render_identifier_instance_text_spec.js
spec/frontend/vue_shared/components/rich_content_editor/services/renderers/render_identifier_paragraph_spec.js
spec/frontend/vue_shared/components/rich_content_editor/toolbar_item_spec.js
spec/frontend/vue_shared/components/security_reports/help_icon_spec.js
spec/frontend/vue_shared/components/security_reports/security_summary_spec.js
spec/frontend/vue_shared/components/sidebar/collapsed_grouped_date_picker_spec.js
spec/frontend/vue_shared/components/sidebar/labels_select/base_spec.js
spec/frontend/vue_shared/components/sidebar/labels_select/dropdown_create_label_spec.js
spec/frontend/vue_shared/components/sidebar/labels_select/dropdown_value_collapsed_spec.js
spec/frontend/vue_shared/components/sidebar/labels_select_vue/dropdown_contents_create_view_spec.js
spec/frontend/vue_shared/components/sidebar/labels_select_vue/store/actions_spec.js
spec/frontend/vue_shared/components/sidebar/labels_select_vue/store/mutations_spec.js
spec/frontend/vue_shared/components/slot_switch_spec.js
spec/frontend/vue_shared/components/split_button_spec.js
spec/frontend/vue_shared/components/table_pagination_spec.js
spec/frontend/vue_shared/components/tabs/tab_spec.js
spec/frontend/vue_shared/components/tooltip_on_truncate_spec.js
spec/frontend/vue_shared/components/user_avatar/user_avatar_link_spec.js
spec/frontend/vue_shared/components/user_avatar/user_avatar_list_spec.js
spec/frontend/vue_shared/components/user_popover/user_popover_spec.js
spec/frontend/vue_shared/directives/validation_spec.js
spec/frontend/vue_shared/security_reports/components/security_report_download_dropdown_spec.js
spec/frontend/vue_shared/security_reports/security_reports_app_spec.js
spec/frontend/vue_shared/security_reports/store/getters_spec.js
spec/frontend/vue_shared/security_reports/store/modules/sast/actions_spec.js
spec/frontend/vue_shared/security_reports/store/modules/secret_detection/actions_spec.js
## upbeat-elion
spec/frontend/vuex_shared/modules/modal/actions_spec.js
spec/frontend/whats_new/components/app_spec.js
...
...
spec/frontend/vue_shared/components/rich_content_editor/editor_service_spec.js
View file @
325fb305
...
...
@@ -20,7 +20,7 @@ describe('Editor Service', () => {
let
mockInstance
;
let
event
;
let
handler
;
const
parseHtml
=
str
=>
{
const
parseHtml
=
(
str
)
=>
{
const
wrapper
=
document
.
createElement
(
'
div
'
);
wrapper
.
innerHTML
=
str
;
return
wrapper
.
firstChild
;
...
...
spec/frontend/vue_shared/components/rich_content_editor/modals/add_image/upload_image_tab_spec.js
View file @
325fb305
...
...
@@ -10,7 +10,7 @@ describe('Upload Image Tab', () => {
afterEach
(()
=>
wrapper
.
destroy
());
const
triggerInputEvent
=
size
=>
{
const
triggerInputEvent
=
(
size
)
=>
{
const
file
=
{
size
,
name
:
'
file-name.png
'
};
const
mockEvent
=
new
Event
(
'
input
'
);
...
...
spec/frontend/vue_shared/components/rich_content_editor/modals/insert_video_modal_spec.js
View file @
325fb305
...
...
@@ -8,7 +8,7 @@ describe('Insert Video Modal', () => {
const
findModal
=
()
=>
wrapper
.
find
(
GlModal
);
const
findUrlInput
=
()
=>
wrapper
.
find
({
ref
:
'
urlInput
'
});
const
triggerInsertVideo
=
url
=>
{
const
triggerInsertVideo
=
(
url
)
=>
{
const
preventDefault
=
jest
.
fn
();
findUrlInput
().
vm
.
$emit
(
'
input
'
,
url
);
findModal
().
vm
.
$emit
(
'
primary
'
,
{
preventDefault
});
...
...
spec/frontend/vue_shared/components/rich_content_editor/services/build_html_to_markdown_renderer_spec.js
View file @
325fb305
...
...
@@ -8,9 +8,9 @@ describe('rich_content_editor/services/html_to_markdown_renderer', () => {
beforeEach
(()
=>
{
baseRenderer
=
{
trim
:
jest
.
fn
(
input
=>
`trimmed
${
input
}
`
),
getSpaceCollapsedText
:
jest
.
fn
(
input
=>
`space collapsed
${
input
}
`
),
getSpaceControlled
:
jest
.
fn
(
input
=>
`space controlled
${
input
}
`
),
trim
:
jest
.
fn
(
(
input
)
=>
`trimmed
${
input
}
`
),
getSpaceCollapsedText
:
jest
.
fn
(
(
input
)
=>
`space collapsed
${
input
}
`
),
getSpaceControlled
:
jest
.
fn
(
(
input
)
=>
`space controlled
${
input
}
`
),
convert
:
jest
.
fn
(),
};
...
...
spec/frontend/vue_shared/components/rich_content_editor/services/renderers/mock_data.js
View file @
325fb305
// Node spec helpers
export
const
buildMockTextNode
=
literal
=>
({
literal
,
type
:
'
text
'
});
export
const
buildMockTextNode
=
(
literal
)
=>
({
literal
,
type
:
'
text
'
});
export
const
normalTextNode
=
buildMockTextNode
(
'
This is just normal text.
'
);
// Token spec helpers
const
buildMockUneditableOpenToken
=
type
=>
{
const
buildMockUneditableOpenToken
=
(
type
)
=>
{
return
{
type
:
'
openTag
'
,
tagName
:
type
,
...
...
@@ -17,7 +17,7 @@ const buildMockUneditableOpenToken = type => {
};
};
const
buildMockTextToken
=
content
=>
{
const
buildMockTextToken
=
(
content
)
=>
{
return
{
type
:
'
text
'
,
tagName
:
null
,
...
...
@@ -25,7 +25,7 @@ const buildMockTextToken = content => {
};
};
const
buildMockUneditableCloseToken
=
type
=>
({
type
:
'
closeTag
'
,
tagName
:
type
});
const
buildMockUneditableCloseToken
=
(
type
)
=>
({
type
:
'
closeTag
'
,
tagName
:
type
});
export
const
originToken
=
buildMockTextToken
(
'
{:.no_toc .hidden-md .hidden-lg}
'
);
const
uneditableOpenToken
=
buildMockUneditableOpenToken
(
'
div
'
);
...
...
spec/frontend/vue_shared/components/rich_content_editor/services/renderers/render_identifier_instance_text_spec.js
View file @
325fb305
...
...
@@ -36,7 +36,7 @@ describe('Render Identifier Instance Text renderer', () => {
`
(
'
should return inline editable, uneditable, and editable tokens in sequence
'
,
({
start
,
middle
,
end
})
=>
{
const
buildMockTextToken
=
content
=>
({
type
:
'
text
'
,
tagName
:
null
,
content
});
const
buildMockTextToken
=
(
content
)
=>
({
type
:
'
text
'
,
tagName
:
null
,
content
});
const
startToken
=
buildMockTextToken
(
start
);
const
middleToken
=
buildMockTextToken
(
middle
);
...
...
spec/frontend/vue_shared/components/rich_content_editor/services/renderers/render_identifier_paragraph_spec.js
View file @
325fb305
...
...
@@ -2,7 +2,7 @@ import renderer from '~/vue_shared/components/rich_content_editor/services/rende
import
{
buildMockTextNode
}
from
'
./mock_data
'
;
const
buildMockParagraphNode
=
literal
=>
{
const
buildMockParagraphNode
=
(
literal
)
=>
{
return
{
firstChild
:
buildMockTextNode
(
literal
),
type
:
'
paragraph
'
,
...
...
spec/frontend/vue_shared/components/rich_content_editor/toolbar_item_spec.js
View file @
325fb305
...
...
@@ -9,7 +9,7 @@ describe('Toolbar Item', () => {
const
findIcon
=
()
=>
wrapper
.
find
(
GlIcon
);
const
findButton
=
()
=>
wrapper
.
find
(
'
button
'
);
const
buildWrapper
=
propsData
=>
{
const
buildWrapper
=
(
propsData
)
=>
{
wrapper
=
shallowMount
(
ToolbarItem
,
{
propsData
,
directives
:
{
...
...
spec/frontend/vue_shared/components/security_reports/help_icon_spec.js
View file @
325fb305
...
...
@@ -8,7 +8,7 @@ const discoverProjectSecurityPath = '/discoverProjectSecurityPath';
describe
(
'
HelpIcon component
'
,
()
=>
{
let
wrapper
;
const
createWrapper
=
props
=>
{
const
createWrapper
=
(
props
)
=>
{
wrapper
=
shallowMount
(
HelpIcon
,
{
propsData
:
{
helpPath
,
...
...
spec/frontend/vue_shared/components/security_reports/security_summary_spec.js
View file @
325fb305
...
...
@@ -6,7 +6,7 @@ import { groupedTextBuilder } from '~/vue_shared/security_reports/store/utils';
describe
(
'
SecuritySummary component
'
,
()
=>
{
let
wrapper
;
const
createWrapper
=
message
=>
{
const
createWrapper
=
(
message
)
=>
{
wrapper
=
shallowMount
(
SecuritySummary
,
{
propsData
:
{
message
},
stubs
:
{
...
...
@@ -26,7 +26,7 @@ describe('SecuritySummary component', () => {
groupedTextBuilder
({
reportType
:
'
Security scanning
'
,
critical
:
1
,
high
:
0
,
total
:
1
}),
groupedTextBuilder
({
reportType
:
'
Security scanning
'
,
critical
:
0
,
high
:
1
,
total
:
1
}),
groupedTextBuilder
({
reportType
:
'
Security scanning
'
,
critical
:
1
,
high
:
2
,
total
:
3
}),
])(
'
given the message %p
'
,
message
=>
{
])(
'
given the message %p
'
,
(
message
)
=>
{
beforeEach
(()
=>
{
createWrapper
(
message
);
});
...
...
spec/frontend/vue_shared/components/sidebar/collapsed_grouped_date_picker_spec.js
View file @
325fb305
...
...
@@ -12,7 +12,7 @@ describe('collapsedGroupedDatePicker', () => {
});
describe
(
'
toggleCollapse events
'
,
()
=>
{
beforeEach
(
done
=>
{
beforeEach
(
(
done
)
=>
{
jest
.
spyOn
(
vm
,
'
toggleSidebar
'
).
mockImplementation
(()
=>
{});
vm
.
minDate
=
new
Date
(
'
07/17/2016
'
);
Vue
.
nextTick
(
done
);
...
...
@@ -26,7 +26,7 @@ describe('collapsedGroupedDatePicker', () => {
});
describe
(
'
minDate and maxDate
'
,
()
=>
{
beforeEach
(
done
=>
{
beforeEach
(
(
done
)
=>
{
vm
.
minDate
=
new
Date
(
'
07/17/2016
'
);
vm
.
maxDate
=
new
Date
(
'
07/17/2017
'
);
Vue
.
nextTick
(
done
);
...
...
@@ -42,7 +42,7 @@ describe('collapsedGroupedDatePicker', () => {
});
describe
(
'
minDate
'
,
()
=>
{
beforeEach
(
done
=>
{
beforeEach
(
(
done
)
=>
{
vm
.
minDate
=
new
Date
(
'
07/17/2016
'
);
Vue
.
nextTick
(
done
);
});
...
...
@@ -56,7 +56,7 @@ describe('collapsedGroupedDatePicker', () => {
});
describe
(
'
maxDate
'
,
()
=>
{
beforeEach
(
done
=>
{
beforeEach
(
(
done
)
=>
{
vm
.
maxDate
=
new
Date
(
'
07/17/2017
'
);
Vue
.
nextTick
(
done
);
});
...
...
spec/frontend/vue_shared/components/sidebar/labels_select/base_spec.js
View file @
325fb305
...
...
@@ -15,7 +15,7 @@ describe('BaseComponent', () => {
let
wrapper
;
let
vm
;
beforeEach
(
done
=>
{
beforeEach
(
(
done
)
=>
{
wrapper
=
createComponent
();
({
vm
}
=
wrapper
);
...
...
spec/frontend/vue_shared/components/sidebar/labels_select/dropdown_create_label_spec.js
View file @
325fb305
...
...
@@ -5,7 +5,7 @@ import dropdownCreateLabelComponent from '~/vue_shared/components/sidebar/labels
import
{
mockSuggestedColors
}
from
'
./mock_data
'
;
const
createComponent
=
headerTitle
=>
{
const
createComponent
=
(
headerTitle
)
=>
{
const
Component
=
Vue
.
extend
(
dropdownCreateLabelComponent
);
return
mountComponent
(
Component
,
{
...
...
spec/frontend/vue_shared/components/sidebar/labels_select/dropdown_value_collapsed_spec.js
View file @
325fb305
...
...
@@ -37,7 +37,7 @@ describe('DropdownValueCollapsedComponent', () => {
const
labels
=
mockLabels
.
concat
(
mockLabels
);
const
vmMoreLabels
=
createComponent
(
labels
);
const
expectedText
=
labels
.
map
(
label
=>
label
.
title
).
join
(
'
,
'
);
const
expectedText
=
labels
.
map
(
(
label
)
=>
label
.
title
).
join
(
'
,
'
);
expect
(
vmMoreLabels
.
labelsList
).
toBe
(
expectedText
);
vmMoreLabels
.
$destroy
();
...
...
@@ -53,7 +53,7 @@ describe('DropdownValueCollapsedComponent', () => {
const
expectedText
=
`
${
mockMoreLabels
.
slice
(
0
,
5
)
.
map
(
label
=>
label
.
title
)
.
map
(
(
label
)
=>
label
.
title
)
.
join
(
'
,
'
)}
, and
${
mockMoreLabels
.
length
-
5
}
more`
;
expect
(
vmMoreLabels
.
labelsList
).
toBe
(
expectedText
);
...
...
@@ -61,7 +61,7 @@ describe('DropdownValueCollapsedComponent', () => {
});
it
(
'
returns first label name when `labels` prop has only one item present
'
,
()
=>
{
const
text
=
mockLabels
.
map
(
label
=>
label
.
title
).
join
(
'
,
'
);
const
text
=
mockLabels
.
map
(
(
label
)
=>
label
.
title
).
join
(
'
,
'
);
expect
(
vm
.
labelsList
).
toBe
(
text
);
});
...
...
spec/frontend/vue_shared/components/sidebar/labels_select_vue/dropdown_contents_create_view_spec.js
View file @
325fb305
...
...
@@ -24,7 +24,7 @@ const createComponent = (initialState = mockConfig) => {
describe
(
'
DropdownContentsCreateView
'
,
()
=>
{
let
wrapper
;
const
colors
=
Object
.
keys
(
mockSuggestedColors
).
map
(
color
=>
({
const
colors
=
Object
.
keys
(
mockSuggestedColors
).
map
(
(
color
)
=>
({
[
color
]:
mockSuggestedColors
[
color
],
}));
...
...
spec/frontend/vue_shared/components/sidebar/labels_select_vue/store/actions_spec.js
View file @
325fb305
...
...
@@ -19,7 +19,7 @@ describe('LabelsSelect Actions', () => {
});
describe
(
'
setInitialState
'
,
()
=>
{
it
(
'
sets initial store state
'
,
done
=>
{
it
(
'
sets initial store state
'
,
(
done
)
=>
{
testAction
(
actions
.
setInitialState
,
mockInitialState
,
...
...
@@ -32,7 +32,7 @@ describe('LabelsSelect Actions', () => {
});
describe
(
'
toggleDropdownButton
'
,
()
=>
{
it
(
'
toggles dropdown button
'
,
done
=>
{
it
(
'
toggles dropdown button
'
,
(
done
)
=>
{
testAction
(
actions
.
toggleDropdownButton
,
{},
...
...
@@ -45,7 +45,7 @@ describe('LabelsSelect Actions', () => {
});
describe
(
'
toggleDropdownContents
'
,
()
=>
{
it
(
'
toggles dropdown contents
'
,
done
=>
{
it
(
'
toggles dropdown contents
'
,
(
done
)
=>
{
testAction
(
actions
.
toggleDropdownContents
,
{},
...
...
@@ -58,7 +58,7 @@ describe('LabelsSelect Actions', () => {
});
describe
(
'
toggleDropdownContentsCreateView
'
,
()
=>
{
it
(
'
toggles dropdown create view
'
,
done
=>
{
it
(
'
toggles dropdown create view
'
,
(
done
)
=>
{
testAction
(
actions
.
toggleDropdownContentsCreateView
,
{},
...
...
@@ -71,13 +71,13 @@ describe('LabelsSelect Actions', () => {
});
describe
(
'
requestLabels
'
,
()
=>
{
it
(
'
sets value of `state.labelsFetchInProgress` to `true`
'
,
done
=>
{
it
(
'
sets value of `state.labelsFetchInProgress` to `true`
'
,
(
done
)
=>
{
testAction
(
actions
.
requestLabels
,
{},
state
,
[{
type
:
types
.
REQUEST_LABELS
}],
[],
done
);
});
});
describe
(
'
receiveLabelsSuccess
'
,
()
=>
{
it
(
'
sets provided labels to `state.labels`
'
,
done
=>
{
it
(
'
sets provided labels to `state.labels`
'
,
(
done
)
=>
{
const
labels
=
[{
id
:
1
},
{
id
:
2
},
{
id
:
3
},
{
id
:
4
}];
testAction
(
...
...
@@ -96,7 +96,7 @@ describe('LabelsSelect Actions', () => {
setFixtures
(
'
<div class="flash-container"></div>
'
);
});
it
(
'
sets value `state.labelsFetchInProgress` to `false`
'
,
done
=>
{
it
(
'
sets value `state.labelsFetchInProgress` to `false`
'
,
(
done
)
=>
{
testAction
(
actions
.
receiveLabelsFailure
,
{},
...
...
@@ -129,7 +129,7 @@ describe('LabelsSelect Actions', () => {
});
describe
(
'
on success
'
,
()
=>
{
it
(
'
dispatches `requestLabels` & `receiveLabelsSuccess` actions
'
,
done
=>
{
it
(
'
dispatches `requestLabels` & `receiveLabelsSuccess` actions
'
,
(
done
)
=>
{
const
labels
=
[{
id
:
1
},
{
id
:
2
},
{
id
:
3
},
{
id
:
4
}];
mock
.
onGet
(
/labels.json/
).
replyOnce
(
200
,
labels
);
...
...
@@ -145,7 +145,7 @@ describe('LabelsSelect Actions', () => {
});
describe
(
'
on failure
'
,
()
=>
{
it
(
'
dispatches `requestLabels` & `receiveLabelsFailure` actions
'
,
done
=>
{
it
(
'
dispatches `requestLabels` & `receiveLabelsFailure` actions
'
,
(
done
)
=>
{
mock
.
onGet
(
/labels.json/
).
replyOnce
(
500
,
{});
testAction
(
...
...
@@ -161,7 +161,7 @@ describe('LabelsSelect Actions', () => {
});
describe
(
'
requestCreateLabel
'
,
()
=>
{
it
(
'
sets value `state.labelCreateInProgress` to `true`
'
,
done
=>
{
it
(
'
sets value `state.labelCreateInProgress` to `true`
'
,
(
done
)
=>
{
testAction
(
actions
.
requestCreateLabel
,
{},
...
...
@@ -174,7 +174,7 @@ describe('LabelsSelect Actions', () => {
});
describe
(
'
receiveCreateLabelSuccess
'
,
()
=>
{
it
(
'
sets value `state.labelCreateInProgress` to `false`
'
,
done
=>
{
it
(
'
sets value `state.labelCreateInProgress` to `false`
'
,
(
done
)
=>
{
testAction
(
actions
.
receiveCreateLabelSuccess
,
{},
...
...
@@ -191,7 +191,7 @@ describe('LabelsSelect Actions', () => {
setFixtures
(
'
<div class="flash-container"></div>
'
);
});
it
(
'
sets value `state.labelCreateInProgress` to `false`
'
,
done
=>
{
it
(
'
sets value `state.labelCreateInProgress` to `false`
'
,
(
done
)
=>
{
testAction
(
actions
.
receiveCreateLabelFailure
,
{},
...
...
@@ -224,7 +224,7 @@ describe('LabelsSelect Actions', () => {
});
describe
(
'
on success
'
,
()
=>
{
it
(
'
dispatches `requestCreateLabel`, `receiveCreateLabelSuccess` & `toggleDropdownContentsCreateView` actions
'
,
done
=>
{
it
(
'
dispatches `requestCreateLabel`, `receiveCreateLabelSuccess` & `toggleDropdownContentsCreateView` actions
'
,
(
done
)
=>
{
const
label
=
{
id
:
1
};
mock
.
onPost
(
/labels.json/
).
replyOnce
(
200
,
label
);
...
...
@@ -244,7 +244,7 @@ describe('LabelsSelect Actions', () => {
});
describe
(
'
on failure
'
,
()
=>
{
it
(
'
dispatches `requestCreateLabel` & `receiveCreateLabelFailure` actions
'
,
done
=>
{
it
(
'
dispatches `requestCreateLabel` & `receiveCreateLabelFailure` actions
'
,
(
done
)
=>
{
mock
.
onPost
(
/labels.json/
).
replyOnce
(
500
,
{});
testAction
(
...
...
@@ -260,7 +260,7 @@ describe('LabelsSelect Actions', () => {
});
describe
(
'
updateSelectedLabels
'
,
()
=>
{
it
(
'
updates `state.labels` based on provided `labels` param
'
,
done
=>
{
it
(
'
updates `state.labels` based on provided `labels` param
'
,
(
done
)
=>
{
const
labels
=
[{
id
:
1
},
{
id
:
2
},
{
id
:
3
},
{
id
:
4
}];
testAction
(
...
...
spec/frontend/vue_shared/components/sidebar/labels_select_vue/store/mutations_spec.js
View file @
325fb305
...
...
@@ -93,14 +93,14 @@ describe('LabelsSelect Mutations', () => {
});
it
(
'
sets provided `labels` to `state.labels` along with `set` prop based on `state.selectedLabels`
'
,
()
=>
{
const
selectedLabelIds
=
selectedLabels
.
map
(
label
=>
label
.
id
);
const
selectedLabelIds
=
selectedLabels
.
map
(
(
label
)
=>
label
.
id
);
const
state
=
{
selectedLabels
,
labelsFetchInProgress
:
true
,
};
mutations
[
types
.
RECEIVE_SET_LABELS_SUCCESS
](
state
,
labels
);
state
.
labels
.
forEach
(
label
=>
{
state
.
labels
.
forEach
(
(
label
)
=>
{
if
(
selectedLabelIds
.
includes
(
label
.
id
))
{
expect
(
label
.
set
).
toBe
(
true
);
}
...
...
@@ -162,7 +162,7 @@ describe('LabelsSelect Mutations', () => {
};
mutations
[
types
.
UPDATE_SELECTED_LABELS
](
state
,
{
labels
:
[{
id
:
2
}]
});
state
.
labels
.
forEach
(
label
=>
{
state
.
labels
.
forEach
(
(
label
)
=>
{
if
(
updatedLabelIds
.
includes
(
label
.
id
))
{
expect
(
label
.
touched
).
toBe
(
true
);
expect
(
label
.
set
).
toBe
(
true
);
...
...
spec/frontend/vue_shared/components/slot_switch_spec.js
View file @
325fb305
...
...
@@ -10,14 +10,14 @@ describe('SlotSwitch', () => {
let
wrapper
;
const
createComponent
=
propsData
=>
{
const
createComponent
=
(
propsData
)
=>
{
wrapper
=
shallowMount
(
SlotSwitch
,
{
propsData
,
slots
,
});
};
const
getChildrenHtml
=
()
=>
wrapper
.
findAll
(
'
* *
'
).
wrappers
.
map
(
c
=>
c
.
html
());
const
getChildrenHtml
=
()
=>
wrapper
.
findAll
(
'
* *
'
).
wrappers
.
map
(
(
c
)
=>
c
.
html
());
afterEach
(()
=>
{
if
(
wrapper
)
{
...
...
spec/frontend/vue_shared/components/split_button_spec.js
View file @
325fb305
...
...
@@ -19,7 +19,7 @@ const mockActionItems = [
describe
(
'
SplitButton
'
,
()
=>
{
let
wrapper
;
const
createComponent
=
propsData
=>
{
const
createComponent
=
(
propsData
)
=>
{
wrapper
=
shallowMount
(
SplitButton
,
{
propsData
,
});
...
...
@@ -27,7 +27,7 @@ describe('SplitButton', () => {
const
findDropdown
=
()
=>
wrapper
.
find
(
GlDropdown
);
const
findDropdownItem
=
(
index
=
0
)
=>
findDropdown
().
findAll
(
GlDropdownItem
).
at
(
index
);
const
selectItem
=
index
=>
{
const
selectItem
=
(
index
)
=>
{
findDropdownItem
(
index
).
vm
.
$emit
(
'
click
'
);
return
wrapper
.
vm
.
$nextTick
();
...
...
@@ -84,7 +84,7 @@ describe('SplitButton', () => {
const
addChangeEventHandler
=
()
=>
{
changeEventHandler
=
jest
.
fn
();
wrapper
.
vm
.
$once
(
'
change
'
,
item
=>
changeEventHandler
(
item
));
wrapper
.
vm
.
$once
(
'
change
'
,
(
item
)
=>
changeEventHandler
(
item
));
};
it
(
'
defaults to first actionItems event
'
,
()
=>
{
...
...
spec/frontend/vue_shared/components/table_pagination_spec.js
View file @
325fb305
...
...
@@ -6,7 +6,7 @@ describe('Pagination component', () => {
let
wrapper
;
let
spy
;
const
mountComponent
=
props
=>
{
const
mountComponent
=
(
props
)
=>
{
wrapper
=
shallowMount
(
TablePagination
,
{
propsData
:
props
,
});
...
...
spec/frontend/vue_shared/components/tabs/tab_spec.js
View file @
325fb305
...
...
@@ -10,7 +10,7 @@ describe('Tab component', () => {
vm
=
mountComponent
(
Component
);
});
it
(
'
sets localActive to equal active
'
,
done
=>
{
it
(
'
sets localActive to equal active
'
,
(
done
)
=>
{
vm
.
active
=
true
;
vm
.
$nextTick
(()
=>
{
...
...
@@ -20,7 +20,7 @@ describe('Tab component', () => {
});
});
it
(
'
sets active class
'
,
done
=>
{
it
(
'
sets active class
'
,
(
done
)
=>
{
vm
.
active
=
true
;
vm
.
$nextTick
(()
=>
{
...
...
spec/frontend/vue_shared/components/tooltip_on_truncate_spec.js
View file @
325fb305
...
...
@@ -139,7 +139,7 @@ describe('TooltipOnTruncate component', () => {
createComponent
({
propsData
:
{
title
:
DUMMY_TEXT
,
truncateTarget
:
el
=>
el
.
childNodes
[
1
],
truncateTarget
:
(
el
)
=>
el
.
childNodes
[
1
],
},
slots
:
{
default
:
[
createChildElement
(),
createChildElement
()],
...
...
spec/frontend/vue_shared/components/user_avatar/user_avatar_link_spec.js
View file @
325fb305
...
...
@@ -20,7 +20,7 @@ describe('User Avatar Link Component', () => {
username
:
'
username
'
,
};
const
createWrapper
=
props
=>
{
const
createWrapper
=
(
props
)
=>
{
wrapper
=
shallowMount
(
UserAvatarLink
,
{
propsData
:
{
...
defaultProps
,
...
...
spec/frontend/vue_shared/components/user_avatar/user_avatar_list_spec.js
View file @
325fb305
...
...
@@ -9,13 +9,13 @@ const TEST_BREAKPOINT = 5;
const
TEST_EMPTY_MESSAGE
=
'
Lorem ipsum empty
'
;
const
DEFAULT_EMPTY_MESSAGE
=
'
None
'
;
const
createUser
=
id
=>
({
const
createUser
=
(
id
)
=>
({
id
,
name
:
'
Lorem
'
,
web_url
:
`
${
TEST_HOST
}
/
${
id
}
`
,
avatar_url
:
`
${
TEST_HOST
}
/
${
id
}
/avatar`
,
});
const
createList
=
n
=>
const
createList
=
(
n
)
=>
Array
(
n
)
.
fill
(
1
)
.
map
((
x
,
id
)
=>
createUser
(
id
));
...
...
@@ -79,10 +79,10 @@ describe('UserAvatarList', () => {
factory
({
propsData
:
{
items
}
});
const
links
=
wrapper
.
findAll
(
UserAvatarLink
);
const
linkProps
=
links
.
wrappers
.
map
(
x
=>
x
.
props
());
const
linkProps
=
links
.
wrappers
.
map
(
(
x
)
=>
x
.
props
());
expect
(
linkProps
).
toEqual
(
items
.
map
(
x
=>
items
.
map
(
(
x
)
=>
expect
.
objectContaining
({
linkHref
:
x
.
web_url
,
imgSrc
:
x
.
avatar_url
,
...
...
spec/frontend/vue_shared/components/user_popover/user_popover_spec.js
View file @
325fb305
...
...
@@ -33,7 +33,7 @@ describe('User Popover Component', () => {
wrapper
.
destroy
();
});
const
findByTestId
=
testid
=>
wrapper
.
find
(
`[data-testid="
${
testid
}
"]`
);
const
findByTestId
=
(
testid
)
=>
wrapper
.
find
(
`[data-testid="
${
testid
}
"]`
);
const
findUserStatus
=
()
=>
wrapper
.
find
(
'
.js-user-status
'
);
const
findTarget
=
()
=>
document
.
querySelector
(
'
.js-user-link
'
);
const
findAvailabilityStatus
=
()
=>
wrapper
.
find
(
UserAvailabilityStatus
);
...
...
@@ -148,7 +148,7 @@ describe('User Popover Component', () => {
createWrapper
({
user
});
expect
(
wrapper
.
findAll
(
GlIcon
).
filter
(
icon
=>
icon
.
props
(
'
name
'
)
===
'
profile
'
).
length
,
wrapper
.
findAll
(
GlIcon
).
filter
(
(
icon
)
=>
icon
.
props
(
'
name
'
)
===
'
profile
'
).
length
,
).
toEqual
(
1
);
});
...
...
@@ -160,9 +160,9 @@ describe('User Popover Component', () => {
createWrapper
({
user
});
expect
(
wrapper
.
findAll
(
GlIcon
).
filter
(
icon
=>
icon
.
props
(
'
name
'
)
===
'
work
'
).
length
).
toEqual
(
1
,
);
expect
(
wrapper
.
findAll
(
GlIcon
).
filter
((
icon
)
=>
icon
.
props
(
'
name
'
)
===
'
work
'
).
length
,
)
.
toEqual
(
1
)
;
});
});
...
...
spec/frontend/vue_shared/directives/validation_spec.js
View file @
325fb305
...
...
@@ -50,7 +50,7 @@ describe('validation directive', () => {
describe
.
each
([
true
,
false
])(
'
with fields untouched and "showValidation" set to "%s"
'
,
showValidation
=>
{
(
showValidation
)
=>
{
beforeEach
(()
=>
{
createComponent
({
showValidation
});
});
...
...
@@ -78,7 +78,7 @@ describe('validation directive', () => {
`
(
'
with input-attributes set to $inputAttributes
'
,
({
inputAttributes
,
validValue
,
invalidValue
})
=>
{
const
setValueAndTriggerValidation
=
value
=>
{
const
setValueAndTriggerValidation
=
(
value
)
=>
{
const
input
=
findInput
();
input
.
setValue
(
value
);
input
.
trigger
(
'
blur
'
);
...
...
spec/frontend/vue_shared/security_reports/components/security_report_download_dropdown_spec.js
View file @
325fb305
...
...
@@ -6,7 +6,7 @@ describe('SecurityReportDownloadDropdown component', () => {
let
wrapper
;
let
artifacts
;
const
createComponent
=
props
=>
{
const
createComponent
=
(
props
)
=>
{
wrapper
=
shallowMount
(
SecurityReportDownloadDropdown
,
{
propsData
:
{
...
props
},
});
...
...
spec/frontend/vue_shared/security_reports/security_reports_app_spec.js
View file @
325fb305
...
...
@@ -42,7 +42,7 @@ describe('Security reports app', () => {
discoverProjectSecurityPath
:
'
/discoverProjectSecurityPath
'
,
};
const
createComponent
=
options
=>
{
const
createComponent
=
(
options
)
=>
{
wrapper
=
mount
(
SecurityReportsApp
,
merge
(
...
...
@@ -61,7 +61,7 @@ describe('Security reports app', () => {
const
pendingHandler
=
()
=>
new
Promise
(()
=>
{});
const
successHandler
=
()
=>
Promise
.
resolve
({
data
:
securityReportDownloadPathsQueryResponse
});
const
failureHandler
=
()
=>
Promise
.
resolve
({
errors
:
[{
message
:
'
some error
'
}]
});
const
createMockApolloProvider
=
handler
=>
{
const
createMockApolloProvider
=
(
handler
)
=>
{
localVue
.
use
(
VueApollo
);
const
requestHandlers
=
[[
securityReportDownloadPathsQuery
,
handler
]];
...
...
@@ -74,7 +74,7 @@ describe('Security reports app', () => {
const
findDownloadDropdown
=
()
=>
wrapper
.
find
(
SecurityReportDownloadDropdown
);
const
findPipelinesTabAnchor
=
()
=>
wrapper
.
find
(
'
[data-testid="show-pipelines"]
'
);
const
findHelpIconComponent
=
()
=>
wrapper
.
find
(
HelpIcon
);
const
setupMockJobArtifact
=
reportType
=>
{
const
setupMockJobArtifact
=
(
reportType
)
=>
{
jest
.
spyOn
(
Api
,
'
pipelineJobs
'
)
.
mockResolvedValue
({
data
:
[{
artifacts
:
[{
file_type
:
reportType
}]
}]
});
...
...
@@ -93,8 +93,8 @@ describe('Security reports app', () => {
describe
.
each
([
false
,
true
])(
'
given the coreSecurityMrWidgetCounts feature flag is %p
'
,
coreSecurityMrWidgetCounts
=>
{
const
createComponentWithFlag
=
options
=>
(
coreSecurityMrWidgetCounts
)
=>
{
const
createComponentWithFlag
=
(
options
)
=>
createComponent
(
merge
(
{
...
...
@@ -108,7 +108,7 @@ describe('Security reports app', () => {
),
);
describe
.
each
(
SecurityReportsApp
.
reportTypes
)(
'
given a report type %p
'
,
reportType
=>
{
describe
.
each
(
SecurityReportsApp
.
reportTypes
)(
'
given a report type %p
'
,
(
reportType
)
=>
{
beforeEach
(()
=>
{
window
.
mrTabs
=
{
tabShown
:
jest
.
fn
()
};
setupMockJobArtifact
(
reportType
);
...
...
@@ -245,7 +245,7 @@ describe('Security reports app', () => {
describe
(
'
given the coreSecurityMrWidgetCounts feature flag is enabled
'
,
()
=>
{
let
mock
;
const
createComponentWithFlagEnabled
=
options
=>
const
createComponentWithFlagEnabled
=
(
options
)
=>
createComponent
(
merge
(
options
,
{
provide
:
{
...
...
@@ -350,7 +350,7 @@ describe('Security reports app', () => {
});
describe
(
'
given coreSecurityMrWidgetDownloads feature flag is enabled
'
,
()
=>
{
const
createComponentWithFlagEnabled
=
options
=>
const
createComponentWithFlagEnabled
=
(
options
)
=>
createComponent
(
merge
(
options
,
{
provide
:
{
...
...
spec/frontend/vue_shared/security_reports/store/getters_spec.js
View file @
325fb305
...
...
@@ -13,7 +13,7 @@ import {
}
from
'
~/vue_shared/security_reports/store/getters
'
;
import
{
CRITICAL
,
HIGH
,
LOW
}
from
'
~/vulnerabilities/constants
'
;
const
generateVuln
=
severity
=>
({
severity
});
const
generateVuln
=
(
severity
)
=>
({
severity
});
describe
(
'
Security reports getters
'
,
()
=>
{
let
state
;
...
...
spec/frontend/vue_shared/security_reports/store/modules/sast/actions_spec.js
View file @
325fb305
...
...
@@ -26,7 +26,7 @@ describe('sast report actions', () => {
});
describe
(
'
setDiffEndpoint
'
,
()
=>
{
it
(
`should commit
${
types
.
SET_DIFF_ENDPOINT
}
with the correct path`
,
done
=>
{
it
(
`should commit
${
types
.
SET_DIFF_ENDPOINT
}
with the correct path`
,
(
done
)
=>
{
testAction
(
actions
.
setDiffEndpoint
,
diffEndpoint
,
...
...
@@ -44,13 +44,13 @@ describe('sast report actions', () => {
});
describe
(
'
requestDiff
'
,
()
=>
{
it
(
`should commit
${
types
.
REQUEST_DIFF
}
`
,
done
=>
{
it
(
`should commit
${
types
.
REQUEST_DIFF
}
`
,
(
done
)
=>
{
testAction
(
actions
.
requestDiff
,
{},
state
,
[{
type
:
types
.
REQUEST_DIFF
}],
[],
done
);
});
});
describe
(
'
receiveDiffSuccess
'
,
()
=>
{
it
(
`should commit
${
types
.
RECEIVE_DIFF_SUCCESS
}
with the correct response`
,
done
=>
{
it
(
`should commit
${
types
.
RECEIVE_DIFF_SUCCESS
}
with the correct response`
,
(
done
)
=>
{
testAction
(
actions
.
receiveDiffSuccess
,
reports
,
...
...
@@ -68,7 +68,7 @@ describe('sast report actions', () => {
});
describe
(
'
receiveDiffError
'
,
()
=>
{
it
(
`should commit
${
types
.
RECEIVE_DIFF_ERROR
}
with the correct response`
,
done
=>
{
it
(
`should commit
${
types
.
RECEIVE_DIFF_ERROR
}
with the correct response`
,
(
done
)
=>
{
testAction
(
actions
.
receiveDiffError
,
error
,
...
...
@@ -107,7 +107,7 @@ describe('sast report actions', () => {
.
replyOnce
(
200
,
reports
.
enrichData
);
});
it
(
'
should dispatch the `receiveDiffSuccess` action
'
,
done
=>
{
it
(
'
should dispatch the `receiveDiffSuccess` action
'
,
(
done
)
=>
{
const
{
diff
,
enrichData
}
=
reports
;
testAction
(
actions
.
fetchDiff
,
...
...
@@ -135,7 +135,7 @@ describe('sast report actions', () => {
mock
.
onGet
(
diffEndpoint
).
replyOnce
(
200
,
reports
.
diff
);
});
it
(
'
should dispatch the `receiveDiffSuccess` action with empty enrich data
'
,
done
=>
{
it
(
'
should dispatch the `receiveDiffSuccess` action with empty enrich data
'
,
(
done
)
=>
{
const
{
diff
}
=
reports
;
const
enrichData
=
[];
testAction
(
...
...
@@ -167,7 +167,7 @@ describe('sast report actions', () => {
.
replyOnce
(
404
);
});
it
(
'
should dispatch the `receiveError` action
'
,
done
=>
{
it
(
'
should dispatch the `receiveError` action
'
,
(
done
)
=>
{
testAction
(
actions
.
fetchDiff
,
{},
...
...
@@ -188,7 +188,7 @@ describe('sast report actions', () => {
.
replyOnce
(
200
,
reports
.
enrichData
);
});
it
(
'
should dispatch the `receiveDiffError` action
'
,
done
=>
{
it
(
'
should dispatch the `receiveDiffError` action
'
,
(
done
)
=>
{
testAction
(
actions
.
fetchDiff
,
{},
...
...
spec/frontend/vue_shared/security_reports/store/modules/secret_detection/actions_spec.js
View file @
325fb305
...
...
@@ -26,7 +26,7 @@ describe('secret detection report actions', () => {
});
describe
(
'
setDiffEndpoint
'
,
()
=>
{
it
(
`should commit
${
types
.
SET_DIFF_ENDPOINT
}
with the correct path`
,
done
=>
{
it
(
`should commit
${
types
.
SET_DIFF_ENDPOINT
}
with the correct path`
,
(
done
)
=>
{
testAction
(
actions
.
setDiffEndpoint
,
diffEndpoint
,
...
...
@@ -44,13 +44,13 @@ describe('secret detection report actions', () => {
});
describe
(
'
requestDiff
'
,
()
=>
{
it
(
`should commit
${
types
.
REQUEST_DIFF
}
`
,
done
=>
{
it
(
`should commit
${
types
.
REQUEST_DIFF
}
`
,
(
done
)
=>
{
testAction
(
actions
.
requestDiff
,
{},
state
,
[{
type
:
types
.
REQUEST_DIFF
}],
[],
done
);
});
});
describe
(
'
receiveDiffSuccess
'
,
()
=>
{
it
(
`should commit
${
types
.
RECEIVE_DIFF_SUCCESS
}
with the correct response`
,
done
=>
{
it
(
`should commit
${
types
.
RECEIVE_DIFF_SUCCESS
}
with the correct response`
,
(
done
)
=>
{
testAction
(
actions
.
receiveDiffSuccess
,
reports
,
...
...
@@ -68,7 +68,7 @@ describe('secret detection report actions', () => {
});
describe
(
'
receiveDiffError
'
,
()
=>
{
it
(
`should commit
${
types
.
RECEIVE_DIFF_ERROR
}
with the correct response`
,
done
=>
{
it
(
`should commit
${
types
.
RECEIVE_DIFF_ERROR
}
with the correct response`
,
(
done
)
=>
{
testAction
(
actions
.
receiveDiffError
,
error
,
...
...
@@ -107,7 +107,7 @@ describe('secret detection report actions', () => {
.
replyOnce
(
200
,
reports
.
enrichData
);
});
it
(
'
should dispatch the `receiveDiffSuccess` action
'
,
done
=>
{
it
(
'
should dispatch the `receiveDiffSuccess` action
'
,
(
done
)
=>
{
const
{
diff
,
enrichData
}
=
reports
;
testAction
(
actions
.
fetchDiff
,
...
...
@@ -135,7 +135,7 @@ describe('secret detection report actions', () => {
mock
.
onGet
(
diffEndpoint
).
replyOnce
(
200
,
reports
.
diff
);
});
it
(
'
should dispatch the `receiveDiffSuccess` action with empty enrich data
'
,
done
=>
{
it
(
'
should dispatch the `receiveDiffSuccess` action with empty enrich data
'
,
(
done
)
=>
{
const
{
diff
}
=
reports
;
const
enrichData
=
[];
testAction
(
...
...
@@ -167,7 +167,7 @@ describe('secret detection report actions', () => {
.
replyOnce
(
404
);
});
it
(
'
should dispatch the `receiveDiffError` action
'
,
done
=>
{
it
(
'
should dispatch the `receiveDiffError` action
'
,
(
done
)
=>
{
testAction
(
actions
.
fetchDiff
,
{},
...
...
@@ -188,7 +188,7 @@ describe('secret detection report actions', () => {
.
replyOnce
(
200
,
reports
.
enrichData
);
});
it
(
'
should dispatch the `receiveDiffError` action
'
,
done
=>
{
it
(
'
should dispatch the `receiveDiffError` action
'
,
(
done
)
=>
{
testAction
(
actions
.
fetchDiff
,
{},
...
...
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