Uh oh!
There was an error while loading. Please reload this page.
Add testing guideline - #109
Conversation
ryoichi-obara
commented
Dec 3, 2019
I support this PR because of users convenience. |
kazuhitoyokoi
commented
Dec 4, 2019
@ryoichi-obara Yes, the discussion has been finished. Currently, it is under review in this pull request. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| ├── test-node.js | ||
| ├── test-node.html | ||
| ├── package.json | ||
| └── test |
There was a problem hiding this comment.
I must admit we don't currently do this for most nodes - This is sensible.
(If this is done correctly can we then add a line to run the test via npm in the package.json? or does that then require we have all the deps in every node (inc node-red...?))
There was a problem hiding this comment.
There is a general discussion over whether a module should include its test material when published to npm. In the wider node community it is a similar discussion to tabs vs spaces - ie, no clear winner and a lot of energy spent not coming to agreement.
| | 2 | Should.js | Assertion | [https://shouldjs.github.io](https://shouldjs.github.io/) | | ||
| | 3 | Sinon.js | Test double | [http://sinonjs.org](http://sinonjs.org/) | | ||
| | 4 | Nock | Test double | [https://github.com/nock/nock](https://github.com/nock/nock) | | ||
| | 5 | Istanbul | Coverage | [https://github.com/gotwarlost/istanbul](https://github.com/gotwarlost/istanbul) | |
There was a problem hiding this comment.
Istanbul is deprecated so we shouldn't included it here. (see https://www.npmjs.com/package/istanbul)
We have a general task to migrate the whole project over to something else, probably nyc.
Uh oh!
There was an error while loading. Please reload this page.
| ├── test-node.js | ||
| ├── test-node.html | ||
| ├── package.json | ||
| └── test |
There was a problem hiding this comment.
There is a general discussion over whether a module should include its test material when published to npm. In the wider node community it is a similar discussion to tabs vs spaces - ie, no clear winner and a lot of energy spent not coming to agreement.
I added testing guideline page which we discussed on the following wiki page.
If there is a suggestion about the contents, please add the comments.