Allow import of layout_test into 3rd party crates#3463
Merged
Conversation
Currently I can't import tests because `cfg(test)` isn't sent to sub-dependencies. This allows you to set a `yew/test` and import into your own tests.
Size ComparisonDetails
✅ None of the examples has changed their size significantly. |
|
Visit the preview URL for this PR (updated for commit 5634c02): https://yew-rs-api--pr3463-patch-1-rmiwbw8k.web.app (expires Fri, 20 Oct 2023 11:14:27 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 |
Benchmark - SSRYew MasterDetails
Pull RequestDetails
|
ranile
reviewed
Oct 15, 2023
Member
ranile
left a comment
There was a problem hiding this comment.
Looks good, thanks! It can be merged once CI is green
|
Can we have an update on this? |
ranile
previously approved these changes
Oct 12, 2024
ranile
approved these changes
Oct 14, 2024
Member
|
|
geoffjay
pushed a commit
to geoffjay/yew
that referenced
this pull request
Jan 25, 2025
* Expose layout tests Currently I can't import tests because `cfg(test)` isn't sent to sub-dependencies. This allows you to set a `yew/test` and import into your own tests. * Update Cargo.toml * Update lib.rs * Update lib.rs * Update lib.rs * AnyScope::test needs feature = test cfg + fmt --------- Co-authored-by: Elina <imelina@elina.website>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This allows you to import layout_test into your crates as described in the docs. As you can't import things behind
#[cfg(test)].https://yew.rs/docs/more/testing
I think this was the intent of this PR
#2310
Should have no impact on the behavior of existing builds as you have to add
yew/testto your build.Fixes #3329
Checklist