Rewrite tests with superagent module