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

Add types declaration file with unit tests #267

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

geopic
Copy link

@geopic geopic commented Aug 11, 2020

Resolves #264. Let me know if there are any issues. I'm not familiar with Mocha and Chai so let me know if the test file needs any improvement (it all works when I run the test command).

@coveralls
Copy link

coveralls commented Aug 11, 2020

Coverage Status

Coverage remained the same at 100.0% when pulling 279eaee on geopic:types-declaration-file into a0309e6 on Rob--W:master.

2 similar comments
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 279eaee on geopic:types-declaration-file into a0309e6 on Rob--W:master.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 279eaee on geopic:types-declaration-file into a0309e6 on Rob--W:master.

Copy link
Owner

@Rob--W Rob--W left a comment

Choose a reason for hiding this comment

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

The unit test in its current form does not offer any verification on the correctness of the Typescript definition.

A way to verify the correctness is to use the type definition with the existing test files (and check that there is no error), and as a smoke test also check whether a meaningful error is produced when an incorrect API is used.

I don't have experience with using it, but it seems that the typescript-eslint package may offer what we need.

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.

TypeScript type declaration file
3 participants