-
-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unit test #388
base: master
Are you sure you want to change the base?
Unit test #388
Changes from all commits
2d23da0
33315c4
3ad95e4
ad220a0
f4cb14e
117235d
c0f5a3b
c0ff83e
45e3d38
a1b062c
0992d16
f6f2352
26017e8
0946e7a
3f1f279
f146cc6
dc637ee
79bcac9
3740572
ce7d973
db6fc64
826e12c
a9e1348
2c3e366
86da51d
7e96d83
c01ea7f
2de174f
7a5f884
d8211ac
30d3666
fbc9eb0
a0b3741
2981d13
164951f
a920670
92e66b2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,12 +15,15 @@ it('renders correctly when there are no items', () => { | |
expect(tree).toMatchSnapshot(); | ||
}); | ||
|
||
it('render Correctly with context data' , async () => { | ||
it('>>>render Correctly with context data' , async () => { | ||
const tree = renderer.create( | ||
<AppContext.Provider value={envMock}> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm thinking it might make sense for someone debugging this test in the future, if you edit the
then you also don't need to keep changing the mock for each test case |
||
<Legend {...props} /> | ||
</AppContext.Provider> | ||
); | ||
expect(tree).toMatchSnapshot(); | ||
).root; | ||
// query for element | ||
const element = tree.findByType("div"); | ||
|
||
expect(element.props.children.length).toEqual(4); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is good start, can we also check if the text or color of the item is "expected" |
||
}) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what do the
>>>
mean? does it do something?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
noo it doesn't have any meaning :) lol