Skip to content

Commit eed1200

Browse files
committed
test: add tests to the new feature
1 parent cc3f201 commit eed1200

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

src/test/__snapshots__/index.spec.js.snap

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,27 @@ exports[`tooltip props tooltip component - html 1`] = `
6969
]
7070
`;
7171

72+
exports[`tooltip props tooltip component - position props 1`] = `
73+
[
74+
<span
75+
id="position-props"
76+
>
77+
Lorem Ipsum
78+
</span>,
79+
<div
80+
className=""
81+
role="tooltip"
82+
style={{}}
83+
>
84+
Hello World!
85+
<div
86+
className=""
87+
style={{}}
88+
/>
89+
</div>,
90+
]
91+
`;
92+
7293
exports[`tooltip props tooltip component - without anchorId 1`] = `
7394
[
7495
<span>

src/test/index.spec.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,14 @@ describe('tooltip props', () => {
5454
const tree = component.toJSON()
5555
expect(tree).toMatchSnapshot()
5656
})
57+
58+
test('tooltip component - position props', () => {
59+
const component = renderer.create(
60+
<TooltipProps id="position-props" content="Hello World!" position={{ x: 0, y: 0 }} />,
61+
)
62+
const tree = component.toJSON()
63+
expect(tree).toMatchSnapshot()
64+
})
5765
})
5866

5967
describe('compute positions', () => {

0 commit comments

Comments
 (0)