Uh oh!
There was an error while loading. Please reload this page.
[RFC] doc: add How to write a node test guide - #30
Conversation
| @@ -0,0 +1,139 @@ | |||
| # How to write a node test | |||
santigimeno
commented
Apr 16, 2016
Updated per @cjihrig comments. Thanks!! |
| const common = require('../common'); | ||
| ``` | ||
| These 2 lines are mandatory and should be included on every test. |
santigimeno
commented
Apr 19, 2016
Updated! Thanks again @cjihrig ! |
cjihrig
commented
Apr 21, 2016
LGTM |
This should also say something about things like |
| ## General recommendations | ||
| - The use of timers is discouraged, unless we're testing timers. The reasons for this are multiple. Mainly, they are a source of flakiness. For a thorough explanation go [here](https://github.com/nodejs/testing/issues/27). | ||
There was a problem hiding this comment.
Perhaps something about common.platformTimeout() here?
jasnell
commented
Apr 21, 2016
Great work @santigimeno! Great to see this. Left a few suggestions. |
Trott
commented
Apr 30, 2016
LGTM. Thank you so much for doing this, @santigimeno! |
Trott
commented
May 12, 2016
Bump! Is this publishable as it stands or does it need a few tweaks? |
Trott
commented
May 12, 2016
It's short enough and important/helpful enough that I would make it part of
|
It's a very basic guide on how to write a
nodetest. It surely needs more work (and syntax corrections!) but it can be a good starting point. Comments are welcome. Thanks.P.S.: I'm planning to create an accompanying text documenting the
commonAPI.