From 51cd3d9b8aeb6eda8867c4979c683ddc25d94645 Mon Sep 17 00:00:00 2001 From: Nikita Lutsenko Date: Mon, 7 Mar 2016 15:42:42 -0800 Subject: [PATCH] Fix race condition in GlobalConfig test. --- spec/ParseGlobalConfig.spec.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/ParseGlobalConfig.spec.js b/spec/ParseGlobalConfig.spec.js index 176c78609b8..4a5d512a313 100644 --- a/spec/ParseGlobalConfig.spec.js +++ b/spec/ParseGlobalConfig.spec.js @@ -5,11 +5,11 @@ var Parse = require('parse/node').Parse; let Config = require('../src/Config'); describe('a GlobalConfig', () => { - beforeEach(function (done) { + beforeEach(done => { let config = new Config('test'); config.database.adaptiveCollection('_GlobalConfig') .then(coll => coll.upsertOne({ '_id': 1 }, { $set: { params: { companies: ['US', 'DK'] } } })) - .then(done()); + .then(() => done); }); it('can be retrieved', (done) => {