chore(package): update jasmine to version 3.0.0 (#4553)

* chore(package): update jasmine to version 3.0.0

Closes #4547

* Fixes failing tests for jasmine 3.0

Starting 3.0, done(something) will fail

* Update tests so they dont leverage var, but let and const

With jasmine 3.0, the randomization engine was making the test fails because of the scope of `var`

* Remove randomizer

* Use same adapter for PG tests, drop table to ensure the tests dont side effect
This commit is contained in:
Florent Vilmart
2018-02-17 09:55:30 -05:00
committed by GitHub
parent 8ec7785d53
commit b754d51e8e
81 changed files with 2698 additions and 2704 deletions

View File

@@ -1,13 +1,13 @@
var PushWorker = require('../src').PushWorker;
var PushUtils = require('../src/Push/utils');
var Config = require('../src/Config');
var { pushStatusHandler } = require('../src/StatusHandler');
var rest = require('../src/rest');
const PushWorker = require('../src').PushWorker;
const PushUtils = require('../src/Push/utils');
const Config = require('../src/Config');
const { pushStatusHandler } = require('../src/StatusHandler');
const rest = require('../src/rest');
describe('PushWorker', () => {
it('should run with small batch', (done) => {
const batchSize = 3;
var sendCount = 0;
let sendCount = 0;
reconfigureServer({
push: {
queueOptions: {
@@ -27,9 +27,9 @@ describe('PushWorker', () => {
return ['ios', 'android']
}
});
var installations = [];
const installations = [];
while(installations.length != 10) {
var installation = new Parse.Object("_Installation");
const installation = new Parse.Object("_Installation");
installation.set("installationId", "installation_" + installations.length);
installation.set("deviceToken","device_token_" + installations.length)
installation.set("badge", 1);
@@ -164,7 +164,7 @@ describe('PushWorker', () => {
const config = Config.get('test');
const handler = pushStatusHandler(config);
const spy = spyOn(config.database, "update").and.callFake(() => {
return Promise.resolve();
return Promise.resolve({});
});
const toAwait = handler.trackSent([
{