Closed cartant closed 3 years ago
We're past half-way through! ✋ @dkosasih
And of course you too @cartant, thanks for the reviews.
These are the operators that need coverage. As you can see, we're almost there 😄
A copy, since the previous message was hidden.
These are the operators that need coverage. As you can see, we're almost there 😄
Merry Christmas everyone. I just want to list down the observable creator function from the source so we can all refer to the list and not cross path while working on it.
Guess this is good to close? @cartant
Yep.
Chore
https://github.com/ReactiveX/rxjs/pull/3944 added
dtslint
to the Travis$FULL_VALIDATE
configuration. However, the coverage of the codebase is far from complete.PRs that contribute to increasing the coverage are welcome.
The purpose of the
dtslint
tests is to ensure that the types are inferred as expected and to ensure that type errors are effected for invalid types. At the moment, there are sometype
tests in the codebase. These are able to do the former, but not the latter - as type errors would break the build.For an example of the
type
tests, see these for thezip
observable and these for thezip
operator. Thetype
tests are not executed when the tests run. Rather, they're tested when the tests are built. And if the tests build, thetype
tests have passed. Not all operators and operators havetype
tests. In fact, many don't.The
dtslint
tests reside in thespec-dtslint
directory. They are written as Mocha-styleit
tests, but they are not run. Instead, TSLint runs rules that test the inferred types against expectations that are expression in comments. For example:You can find the
type
tests that have been converted todtslint
tests for thezip
observable here and for thezip
operator here.Apart from converting the
type
tests, we want to ensure that there aredtslint
tests for each overload signature for each observable and operator.Submitting separate PRs - each with one or only a few observables or operators - would be the best way to approach this, as PRs with a limited number of observables or operators should be straightforward to review.
Running the tests
The tests will run on the Travis CI build, but you can run them locally using the
dtslint
script:However, doing so will see
dtslint
run vianpx
, which means it will be downloaded each time the script runs. This is very slow, as it also downloads several versions of TypeScript.If you are going to run
dtslint
locally, you might want to install it globally and then run the tests using:Additional context