Skip to content
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

test: ChartItem fixes #7420

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

pjonsson
Copy link
Contributor

What this PR does

Removes a few casts from one test, and adds a type annotation + missing fields to another test.

Test me

Test only changes.

Checklist

  • There are unit tests to verify my changes are correct or unit tests aren't applicable (if so, write quick reason why unit tests don't exist)
  • I've updated relevant documentation in doc/.
  • I've updated CHANGES.md with what I changed.
  • I've provided instructions in the PR description on how to test this PR.

The annotation is not required.
This reveals that there are missing
fields in the chartItem, so add
in the missing fields.
@@ -18,11 +24,15 @@ describe("MomentPointsChart", function () {
{ x: new Date("2020-05-29"), y: 0.5 },
{ x: new Date("2020-05-30"), y: 0.5 }
],
domain: { x: [new Date("2020-05-25"), new Date("2020-05-30")], y: [0, 10] },
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I assume the domain relates to the points. I don't know if domain can contain dates, but nothing complains when I put them there, so I did.

I took the other values from one of the chartItems in BottomDockChartSpec.tsx.

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.

1 participant