Fix wrong order of resetting data in test helper.

This commit is contained in:
Nikita Lutsenko
2016-02-26 22:16:06 -08:00
parent d30c3e90df
commit 768a781f98

View File

@@ -52,13 +52,13 @@ delete defaultConfiguration.cloud;
// Allows testing specific configurations of Parse Server // Allows testing specific configurations of Parse Server
var setServerConfiguration = configuration => { var setServerConfiguration = configuration => {
api = new ParseServer(configuration);
app = express();
app.use('/1', api);
cache.clearCache();
server.close(); server.close();
cache.clearCache();
app = express();
api = new ParseServer(configuration);
app.use('/1', api);
server = app.listen(port); server = app.listen(port);
} };
var restoreServerConfiguration = () => setServerConfiguration(defaultConfiguration); var restoreServerConfiguration = () => setServerConfiguration(defaultConfiguration);