Skip to content

Conversation

@dalle
Copy link
Owner

@dalle dalle commented May 29, 2018

Fixes plotly#2660.

expect(hoverTrace.pointNumber).toEqual(17);
expect(hoverTrace.x).toEqual(0.388);
expect(hoverTrace.y).toEqual(1);
expect(hoverTrace.text).toEqual(0);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see you're faithfully mimicking the previous test, but I'd prefer toBe instead of toEqual - lately I use toBe whenever possible, which I think includes all of these cases - especially for the 0, since some values we would find unacceptable would pass, like '' == 0, whereas toBe is stricter.

@alexcjohnson
Copy link

@dalle this looks great! Just a small comment, then feel free to open the PR against the main repo. Thanks!

@dalle dalle merged commit 1113e33 into master May 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants