Install the latest version of node and npm from node
It has been tested with node v6.10.0 and npm 3.10.10
$ npm Install
$ npm test
$ `alias hackernews='node index.js'
$ hackernews --posts 12
A number of 3rd party node libraries were used
Used to validate and parse command line arguments
jQuery style DOM parsing. Used to extract properties from downloaded HN page.
Testing framework
BDD assertions for mocha. To have nice verbose assertions over nodes assert library.
Nock is an HTTP mocking and expectations library for Node.js.
- Return full usage when tool is used incorrectly.
- Better error handling when the page cannot be parsed.