'use strict';
const Uploader = require('../lib/uploader').default;
const sinon = require('sinon');
let u;
let info = {
  emit: sinon.spy()
};
before(() => {
  u = new Uploader(info, 'upload');
});
describe('Uploader > doNextAction', () => {
  it('info.shouldStop = true', () => {
    info.shouldStop = true;

    let p = u.doNextAction();
    info.emit.should.be.calledWith('stop');
  });
});

@@ -141,16 +141,20 @@
 ;%0Abefore
+Each
 (() =%3E %7B
@@ -154,16 +154,16 @@
 () =%3E %7B%0A
-
   u = ne
@@ -305,17 +305,16 @@
 = true;%0A
-%0A
     let 
@@ -335,16 +335,16 @@
 tion();%0A
-
     info
@@ -385,12 +385,524 @@
 ;%0A  %7D);%0A
+  it('%E5%A6%82%E6%9E%9C%E6%9C%AA%E4%B8%8A%E4%BC%A0%E5%AE%8C%EF%BC%8C%E6%89%A7%E8%A1%8CuploadChunk', () =%3E %7B%0A    info.shouldStop = false;%0A    info.blob = %7B%0A      size: 128 * 64%0A    %7D;%0A    let c = 122;%0A    u._chunkInfos = %5Bc%5D;%0A    u.uploadChunk = sinon.spy();%0A    let p = u.doNextAction();%0A    u.uploadChunk.should.be.calledWith(c);%0A  %7D);%0A  it('%E5%A6%82%E6%9E%9C%E4%B8%8A%E4%BC%A0%E5%AE%8C%EF%BC%8C%E6%89%A7%E8%A1%8CmakeImgFile', () =%3E %7B%0A    info.shouldStop = false;%0A    info.blob = %7B%0A      size: 128 * 64%0A    %7D;%0A    u._chunkInfos = %5B%5D;%0A    u.makeImgFile = sinon.spy();%0A    let p = u.doNextAction();%0A    u.makeImgFile.should.be.calledOnce();%0A  %7D);%0A
 %7D);%0A

add test