Merge branch 'improve_tests' into api-v3

This commit is contained in:
Blade Barringer
2016-01-16 19:24:39 -06:00
5 changed files with 43 additions and 43 deletions

View File

@@ -1,7 +1,9 @@
/* eslint-disable no-use-before-define */
import superagent from 'superagent';
const API_TEST_SERVER_PORT = 3003;
var apiVersion;
let apiVersion;
// Sets up an abject that can make all REST requests
// If a user is passed in, the uuid and api token of
@@ -17,7 +19,7 @@ export function requester (user = {}, additionalSets) {
requester.setApiVersion = (version) => {
apiVersion = version;
}
};
function _requestMaker (user, method, additionalSets) {
if (!apiVersion) throw new Error('apiVersion not set');