Skip to content

Commit

Permalink
ci: Refactor progress test for CI platform sucess
Browse files Browse the repository at this point in the history
  • Loading branch information
q2s2t committed Oct 14, 2018
1 parent 85faa27 commit 98419e0
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions test/func/add.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,17 @@ describe('Functional: add()', function () {

it('should emit progress values', function (done) {
const archive = `${tmpDir}/progress.7z`
const source = `${mockDir}/DirImages/`
const source = `${mockDir}/DirHex/`
const seven = add(archive, source, { bs: ['p1'] })
let once = false
seven.on('progress', function (progress) {
once = true
expect(progress.percent).to.be.an('number')
expect(progress.fileCount).to.be.an('number')
try { kill(seven._childProcess.pid) } catch (e) {}
}).on('end', () => done())
}).on('end', function () {
expect(once).to.be.true
done()
})
})

it('should create an archive of correct size', function (done) {
Expand Down

0 comments on commit 98419e0

Please sign in to comment.