Skip to content

Commit

Permalink
test(vx-annotation): 100% coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
hshoff committed Aug 19, 2020
1 parent 9a2e450 commit 89b4a01
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/vx-annotation/test/LinePathAnnotation.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,15 @@ describe('<LinePathAnnotation />', () => {
),
).toBe(true);
});

test('it should have default x and y accessors', () => {
const point = new Point({ x: 0, y: 0 });
const points = [point];
const wrapper = shallow(<LinePathAnnotation label="test" points={points} />);
const linepath = wrapper.childAt(0).props();
const x = linepath.x(point);
const y = linepath.y(point);
expect(x).toEqual(point.x);
expect(y).toEqual(point.y);
});
});

0 comments on commit 89b4a01

Please sign in to comment.