Skip to content

Options parameter is missing in prettyDOM function #178

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
thomaslombart opened this issue Jul 5, 2019 · 3 comments · Fixed by #181
Closed

Options parameter is missing in prettyDOM function #178

thomaslombart opened this issue Jul 5, 2019 · 3 comments · Fixed by #181

Comments

@thomaslombart
Copy link

thomaslombart commented Jul 5, 2019

The documentation related to prettyDOM is missing the third parameter: options.

It seems prettyDOM uses prettyFormat under the hood. The options we can pass to prettyDOM can be found here 🙂

@afontcu
Copy link
Member

afontcu commented Jul 6, 2019

Hi! Looks about right, the options parameter is accepted and extended here.

Would you like to submit a PR to add the missing option to the docs? 🙌

@thomaslombart
Copy link
Author

Sure, I can! 🙂
I'll do it in the day.

@thomaslombart
Copy link
Author

thomaslombart commented Jul 8, 2019

The docs for prettyDOM states that the functions is defined as:

function prettyDOM(node: HTMLElement, maxLength?: number): string

I was on the point of adding the options parameter when I found that the options type is also missing from the typings in dom-testing-library.

I'm going to open an issue on the dom-testing-library and will add the typings there. If you consider we can already add the docs, I'll do it. Otherwise, you can consider this issue on hold 🙂

Update: the options type has been added. I'll add the docs by the end of tomorrow.

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 a pull request may close this issue.

2 participants