[#0001] Digvijay: adding chai and mocha for testing and adding tests for state and machine