November 2013
Intermediate to advanced
148 pages
3h 12m
English
Functional tests assure us that our code does what we expect it to do. In this section, we’ll develop a test for our networked file-watching server and client programs. We’ll create a mock server that conforms to our LDJ protocol while exposing flaws in the client.
After we write the test, we’ll fix the client code so that it passes. This will bring up many Node concepts, include extending core classes, creating and using custom modules, and developing on top of EventEmitters. But first we need to understand a problem lurking in our client/server programs as currently written.
When you develop networked programs in Node, they’ll often communicate by passing messages. ...
Read now
Unlock full access