Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
amundsen_dev
Project
Project
Details
Activity
Releases
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Surendar Reddy Mangannagari
amundsen_dev
Commits
e186227b
Unverified
Commit
e186227b
authored
Jul 31, 2020
by
Tamika Tannis
Committed by
GitHub
Jul 31, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update a test (#525)
parent
94330854
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
index.spec.tsx
...lication/static/js/components/Tags/TagInfo/index.spec.tsx
+9
-2
No files found.
amundsen_application/static/js/components/Tags/TagInfo/index.spec.tsx
View file @
e186227b
...
@@ -5,11 +5,17 @@ import * as React from 'react';
...
@@ -5,11 +5,17 @@ import * as React from 'react';
import
{
shallow
}
from
'enzyme'
;
import
{
shallow
}
from
'enzyme'
;
import
*
as
UtilMethods
from
'ducks/utilMethods'
;
import
*
as
UtilMethods
from
'ducks/utilMethods'
;
import
{
updateSearchState
}
from
'ducks/search/reducer'
;
import
{
mapDispatchToProps
,
TagInfo
,
TagInfoProps
}
from
'.'
;
import
{
mapDispatchToProps
,
TagInfo
,
TagInfoProps
}
from
'.'
;
const
logClickSpy
=
jest
.
spyOn
(
UtilMethods
,
'logClick'
);
const
logClickSpy
=
jest
.
spyOn
(
UtilMethods
,
'logClick'
);
logClickSpy
.
mockImplementation
(()
=>
null
);
logClickSpy
.
mockImplementation
(()
=>
null
);
jest
.
mock
(
'ducks/search/reducer'
,
()
=>
({
updateSearchState
:
jest
.
fn
(),
}));
describe
(
'TagInfo'
,
()
=>
{
describe
(
'TagInfo'
,
()
=>
{
const
setup
=
(
propOverrides
?:
Partial
<
TagInfoProps
>
)
=>
{
const
setup
=
(
propOverrides
?:
Partial
<
TagInfoProps
>
)
=>
{
const
props
=
{
const
props
=
{
...
@@ -109,7 +115,8 @@ describe('mapDispatchToProps', () => {
...
@@ -109,7 +115,8 @@ describe('mapDispatchToProps', () => {
result
=
mapDispatchToProps
(
dispatch
);
result
=
mapDispatchToProps
(
dispatch
);
});
});
it
(
'sets searchTag on the props'
,
()
=>
{
it
(
'sets searchTag on the props to trigger desired action'
,
()
=>
{
expect
(
result
.
searchTag
).
toBeInstanceOf
(
Function
);
result
.
searchTag
();
expect
(
updateSearchState
).
toHaveBeenCalled
();
});
});
});
});
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