add jshintrc for tests
update connection state with setDiff instead of set