Fix the bugs on unit-test of room.js

Consider picking up mocha for unit-test, seriously.