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

Convert unit tests from TS to JS #164

Open
christroutner opened this issue Nov 21, 2019 · 0 comments
Open

Convert unit tests from TS to JS #164

christroutner opened this issue Nov 21, 2019 · 0 comments
Labels
Ready Issue is actionable.

Comments

@christroutner
Copy link

There are issues with using TS to write unit tests. Here is an example of why unit tests should be written in JS:

I couldn't write a test-case to test the error handling if a user passes a string in place of an integer, because that test case invalidates the typings in TS. But the fact is that anyone can import the bitbox-sdk library into a JS project and they can accidentally pass a string in place of an integer.

So here is a case in which we can't even write a test because of TS, to catch a very real use case.

@christroutner christroutner added the Ready Issue is actionable. label Nov 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready Issue is actionable.
Projects
None yet
Development

No branches or pull requests

1 participant