lamassu/lamassu-machine — pull request #43 by haxwell (2014-12-17 00:00:13+00:00)
Title: Canary replace literal strings with constant strings

This work is centered around changing the literal string 'pendingIdle' to State.PENDING_IDLE, and the literal 'networkDown' to State.NETWORK_DOWN.

The biggest change has been in adding getters and setters for the variables Browser and BillValidator. These were necessary because unit tests needed to be able to supply these objects as mocks, and without getters and setters, that was not feasible.

I expect that more (if not all) variables in Brain.js will get getters and setters as I progress.

I added unit tests to ensure the current getters and setters are working as expected. More to come.

I also added tests around various functionality having to do with State.PENDING_IDLE and State.NETWORK_DOWN.