created specific test cases for node/browser
changed api: only passes options to beforeSend in node
passes both xhr and options in browser