packager: simplify ScribeLogger-test
Reviewed By: cpojer Differential Revision: D4481570 fbshipit-source-id: 27beae850806d8d7f526a3196b2962a18e514007
This commit is contained in:
parent
0e0a6e8a29
commit
bf930e473a
|
@ -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();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue