Skip to content

server-test-utils: render() returns Cheerio not string (d.ts) #1131

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
wiese opened this issue Feb 5, 2019 · 2 comments
Closed

server-test-utils: render() returns Cheerio not string (d.ts) #1131

wiese opened this issue Feb 5, 2019 · 2 comments
Labels

Comments

@wiese
Copy link
Contributor

wiese commented Feb 5, 2019

Version

1.0.0-beta.29

Reproduction link

https://codesandbox.io/s/4xvk5l7mo9

Steps to reproduce

index.d.ts declares render() as returning string while the documentation states that it is indeed "CheerioWrapper" (Cheerio) - the latter is also what can be observed when inspecting the result.

(f3dfb1e, for #571, may have been an impediment for this in the past but is long fixed.)

What is expected?

render() type definition declares Cheerio return value.

What is actually happening?

render() type definition declares string return value.


We created a hack around this using @types/cheerio.

@eddyerburgh eddyerburgh added the bug label Feb 5, 2019
@eddyerburgh
Copy link
Member

Thanks for the bug report, would you like to make the change to the types file—https://github.com/vuejs/vue-test-utils/blob/dev/packages/server-test-utils/types/index.d.ts?

@wiese
Copy link
Contributor Author

wiese commented Feb 5, 2019

Thanks for triaging. Will provide a PR during the course of this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants