Add pending request unit test.
Add request context as the first parameter in func.

- Fix the unit test.
Merge branch 'request'
Refactor the unit test to better group.
Refactor the test to make it less.
Add one more unit test to trigger when broadcast.
Make socket.io instance as the first paramter.

Then, we can use .bind() function to create a shortcut.