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

feat: expand serde attributes for TestBuffer #389

Merged
merged 1 commit into from
Aug 22, 2023

Conversation

a-kenji
Copy link
Contributor

@a-kenji a-kenji commented Aug 8, 2023

This makes it possible to deserialize/serialize the whole test buffer with the serde feature.

@codecov
Copy link

codecov bot commented Aug 8, 2023

Codecov Report

Merging #389 (e66623e) into main (6153371) will decrease coverage by 0.04%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main     #389      +/-   ##
==========================================
- Coverage   86.41%   86.38%   -0.04%     
==========================================
  Files          40       40              
  Lines        9432     9436       +4     
==========================================
  Hits         8151     8151              
- Misses       1281     1285       +4     
Files Changed Coverage Δ
src/backend/test.rs 43.24% <0.00%> (-0.40%) ⬇️
src/buffer.rs 93.14% <0.00%> (-0.30%) ⬇️
src/layout.rs 96.61% <0.00%> (-0.12%) ⬇️

@joshka
Copy link
Member

joshka commented Aug 8, 2023

I'm curious what you're using this for.

Do you think this needs unit / integ tests? It would help catch any serialization breaking changes if these were tested.

@joshka joshka added this to the v0.23.0 milestone Aug 21, 2023
@a-kenji
Copy link
Contributor Author

a-kenji commented Aug 22, 2023

I am not quite sure how to test the serialization without bringing in another dependency. I will look further into it.

I am in the process of prototyping a snapshot testing helper, specifically for ratatui.
Which should be capable of rendering exactly what ratatui is able to render, to make testing styles and modifiers easier and maybe even color themes.

serde_ratatui

@joshka
Copy link
Member

joshka commented Aug 22, 2023

I am in the process of prototyping a snapshot testing helper, specifically for ratatui.
Which should be capable of rendering exactly what ratatui is able to render, to make testing styles and modifiers easier and maybe even color themes.

Cool stuff!

Copy link
Member

@joshka joshka left a comment

Choose a reason for hiding this comment

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

No big deal on the tests for this - unless there's a simple way to do this. None of our other serializable types have tests right now.

@joshka
Copy link
Member

joshka commented Aug 22, 2023

Needs to be rebased before merging. Can you please take a look?

@a-kenji a-kenji force-pushed the feat/expand-serde-test-buffer branch from 1054317 to e66623e Compare August 22, 2023 12:45
@joshka joshka added this pull request to the merge queue Aug 22, 2023
Merged via the queue into ratatui:main with commit 57ea871 Aug 22, 2023
@a-kenji a-kenji deleted the feat/expand-serde-test-buffer branch August 22, 2023 12:51
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