packager: simplify ScribeLogger-test

Reviewed By: cpojer

Differential Revision: D4481570

fbshipit-source-id: 27beae850806d8d7f526a3196b2962a18e514007
This commit is contained in:
Jean Lauliac 2017-01-30 07:32:36 -08:00 committed by Facebook Github Bot
parent 0e0a6e8a29
commit bf930e473a
1 changed files with 1 additions and 2 deletions

View File

@ -23,13 +23,12 @@ class BatchProcessorMock {
this._queue.push([item, callback]);
}
flush(callback) {
flushMock() {
const {_queue} = this;
this._queue = [];
process.nextTick(() => {
this._processBatch(_queue.map(pair => pair[0]), (error, res) => {
_queue.forEach((pair, i) => pair[1](error, res && res[i]));
callback();
});
});
}