Improve flattening of results from pushAdapter

This commit is contained in:
Florent Vilmart
2016-03-26 11:02:26 -04:00
parent d47a756f80
commit aeda714b87
4 changed files with 18 additions and 13 deletions

View File

@@ -1,6 +1,6 @@
"use strict";
var PushController = require('../src/Controllers/PushController').PushController;
var pushStatusHandler = require('../src/pushStatusHandler');
var Config = require('../src/Config');
const successfulTransmissions = function(body, installations) {
@@ -357,4 +357,8 @@ describe('PushController', () => {
});
});
it('should flatten', () => {
var res = pushStatusHandler.flatten([1, [2], [[3, 4], 5], [[[6]]]])
expect(res).toEqual([1,2,3,4,5,6]);
})
});