I have got a small backend server in nodejs which is using socket.io to connect with client and on the other side is uses google api to delivery data.
Is there a good way to write tests and still use something like Travis CI?
In a local enviroment there is no problem with doing test with a fake user.
Yes, you have a couple options.
In either case you probably want to mock out the google API while testing using Sinon or Nock.
Just answered a question using nock but was too sleepy to care to check the old date. =/
See if this answer can help you in any way about HTTP mocking with nock: