TypeProps icon indicating copy to clipboard operation
TypeProps copied to clipboard

Run examples as tests

Open SimonMeskens opened this issue 7 years ago • 2 comments

The examples need to be converted to proper tests, so I can add a test command, this is not a lot of work, I just want to finish the existing examples first

SimonMeskens avatar Apr 23 '18 04:04 SimonMeskens

First off, I converted most of the samples to proper tests now. They output TAP through tape, using a modified harness to enforce some form of type equality for the expected output.

For linting, I want to find a good setup that combines enforcing prettier and a strict set of tslint rules. This needs quite some tweaking and the plugins I tried are not making it as easy as I thought.

Eventually, the test command should: lint first (with prettier formatting as lint rules), then compile, then run the tests. Since running the tests already happens through ts-node, the compilation step might be optional. I'd also like the linting step and maybe even the compilation step to produce results in TAP format and then use tap-spec or similar to report everything, as well as maybe saving a copy of the TAP as an artifact.

SimonMeskens avatar May 08 '18 16:05 SimonMeskens

All examples now run on npm test, I cleaned up the test command, added preliminary support for testing the core library, no progress on linting yet.

SimonMeskens avatar May 09 '18 13:05 SimonMeskens