Skip to content

docs(core): add readme for core API #382

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

Closed
wants to merge 2 commits into from
Closed

docs(core): add readme for core API #382

wants to merge 2 commits into from

Conversation

mcous
Copy link
Collaborator

@mcous mcous commented Jun 21, 2024

In order to support the new threlte/test-renderer, exposing the low-level rendering and cleanup core of @testing-library/svelte will allow the two projects to share a bunch of common logic, and provide a better experience for users writing tests for Svelte applications with Threlte.

This PR adds the proposed documentation for this core as a little form of README-driven-development. I've taken a look at the Threlte test-renderer source code, and I think these methods would allow a lot of good functionality re-use while remaining flexible to both projects' needs

Rendered output

Copy link
Collaborator Author

@mcous mcous left a comment

Choose a reason for hiding this comment

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

I'm still satisfied with the method list, but these docs are a bit hard to read and will be annoying to keep in sync. I wonder if generating them from JSDoc / TypeDoc would be a better experience

- options: [Options](#options)
- renderOptions: [RenderOptions](#renderoptions)
- Returns
- [TargetAndBaseElements](#renderelements)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Suggested change
- [TargetAndBaseElements](#renderelements)
- [TargetAndBaseElements](#targetandbaseelements)


#### `TargetAndBaseElements.target`

An [HTMLElement][]the component should be mounted into, usually a `<div>` in
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Suggested change
An [HTMLElement][]the component should be mounted into, usually a `<div>` in
An [HTMLElement][] the component should be mounted into, usually a `<div>` in

@mcous mcous force-pushed the readme-links-cleanup branch from 34357ad to 533475d Compare June 24, 2024 19:08
Base automatically changed from readme-links-cleanup to next June 24, 2024 19:09
@mcous
Copy link
Collaborator Author

mcous commented Jul 1, 2024

Closing in favor of #391

@mcous mcous closed this Jul 1, 2024
@mcous mcous deleted the core-readme branch October 18, 2024 23:57
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