Added code coverage with with istanbul. Run via 'npm run coverage' then open coverage/index.html.