moll / js-must

An assertion library for JavaScript and Node.js with a friendly BDD syntax (awesome.must.be.true()). It ships with many expressive matchers and is test runner and framework agnostic. Follows RFC 2119 with its use of MUST. Good stuff and well tested.
Other
336 stars 35 forks source link

Create typescript definitions #37

Open dgileadi opened 8 years ago

dgileadi commented 8 years ago

Some tools (like Visual Studio Code) can use typescript definitions for code insight and completion. Many popular JS libraries already have typescript definitions. It would be really nice to have typescript definitions for js-must too.

In any case thanks for a great library!

moll commented 8 years ago

:+1:

I was thinking of some just today while giving Flow a try. Perhaps it's possible to autogenerate both from inline documentation...

moll commented 8 years ago

@dgileadi: @KarlPurk added some type definitions. Would you mind giving them a spin, too?

moll commented 8 years ago

Let's carry on from https://github.com/moll/js-must/pull/48 here, @KarlPurk.

:+1: for the tests, too. What do you have in mind? I can imagine positive cases are easy to test — everything in some file has to pass. How would you do negative ones? "This file has to have this number of failures"? Or maybe negative cases here are too much work for little benefit.

KarlPurk commented 8 years ago

Yes I think there's little benefit to negative testing, the main value in testing the definition file is to make sure it covers the API fully (and correctly) so we likely just need to test the happy path.