Skip to content

Type definition tests #870

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
jamestalmage opened this issue May 25, 2016 · 10 comments
Closed

Type definition tests #870

jamestalmage opened this issue May 25, 2016 · 10 comments

Comments

@jamestalmage
Copy link
Contributor

jamestalmage commented May 25, 2016

It would be good to have a set of typescript fixtures that exercised the API.
The test would just be running the typescript compiler and ensuring it didn't complain about the syntax.

That seems to be how they do it for DefinitelyTyped.

@SamVerschueren @ivogabe - That sound like a good idea?

@SamVerschueren
Copy link
Contributor

Yes, I was thinking the same yesterday "we should have tests for the type definitions". That would definitely be an improvement to somewhat validate them as the definitions getting more complex and more features are added.

@jamestalmage
Copy link
Contributor Author

When we add new API features we can use .failing to mark them until a TypeScript contributor updates the definition...

Except we don't test with AVA 😭 .

@sindresorhus
Copy link
Member

@jamestalmage We can use skipped tests.

@unional
Copy link

unional commented Jun 16, 2016

@jamestalmage
Copy link
Contributor Author

Just shape test is not enough:

It would almost certainly be better than the nothing we have now though!

@unional
Copy link

unional commented Jun 16, 2016

It would almost certainly be better than the nothing we have now though!

😄 of course.

@unional
Copy link

unional commented Jun 16, 2016

Oh, by the way, if you lobby on this... 😄
microsoft/TypeScript#7661

@ivogabe
Copy link
Contributor

ivogabe commented Jul 1, 2016

This seems to be related too: microsoft/TypeScript#9281

@sindresorhus sindresorhus changed the title TypeScript tests Type definition tests Aug 17, 2016
@sindresorhus
Copy link
Member

We also need this for a forthcoming Flow type definition: #1007

@novemberborn
Copy link
Member

We have… something, now. Closing since it's not clear to me whether there are any deficiencies in our current approach.

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

No branches or pull requests

7 participants