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

Add a first integration test #97

Merged
merged 3 commits into from
Oct 13, 2024
Merged

Conversation

LukaOber
Copy link
Collaborator

Adds a test for the basic line chart example from echarts. I got the chart options from the link in the test and converted them to json. I also converted the charming chart to json and compared them with each other.

If both comparisons are the same this library is serializing correctly.

After I implemented the test, I noticed this is not the case.

Vec<T> with only one element should be serialized as T. The second commit addresses this issue for the x_axis and y_axis by using serde_as PreferOne.

In following PRs I will correct this behaviour for the remaining fields.

The main focus of this PR is the test and how we are testing the correct serialization.

@LukaOber LukaOber changed the title Add a first test Add a first integration test Oct 11, 2024
Copy link
Owner

@yuankunzhang yuankunzhang left a comment

Choose a reason for hiding this comment

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

LGTM!

@yuankunzhang yuankunzhang merged commit 439643c into yuankunzhang:main Oct 13, 2024
2 checks passed
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