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

Internal: Add tests #10

Open
kaicataldo opened this issue Oct 13, 2020 · 2 comments
Open

Internal: Add tests #10

kaicataldo opened this issue Oct 13, 2020 · 2 comments
Labels
help wanted Extra attention is needed internal This issue is not user-facing

Comments

@kaicataldo
Copy link
Owner

Now that the feature set is stabilizing a bit, the plugin desperately needs tests. Any help is appreciated!

@kaicataldo kaicataldo added help wanted Extra attention is needed internal This issue is not user-facing labels Oct 13, 2020
@dpfavand
Copy link
Contributor

Do you have any preferences for testing library?

Jest + testing-library/react seems like a pretty common combination that probably has a relatively low learning curve for contributors.

@kaicataldo
Copy link
Owner Author

Yeah, that does seem pretty common in the React world! Makes sense to test the withHydration HOC and the hydrated bundle. What I was initially thinking was:

  1. Unit testing withHydration
  2. Integration tests where we run the Eleventy build (maybe a nested full project with a package.json and everything?) and then assert that the generated files have the expected content. We could then load up the site in a headless browser and make assertions about the hydrated component behavior.

Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed internal This issue is not user-facing
Projects
None yet
Development

No branches or pull requests

2 participants