Skip to content

Commit

Permalink
added this.timeout to every it
Browse files Browse the repository at this point in the history
  • Loading branch information
yakovmeister committed Apr 9, 2018
1 parent f7c4c1a commit f1285e6
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions test/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,38 +14,42 @@ describe('PDF2Pic', function () {
let savedir = `./test/output/${Math.random().toString(10).substring(7)}`

pdf2pic.setOption('savedir', savedir)
this.timeout(1000000)
})

it('should convert pdf1 first page', function () {
this.timeout(1000000)
return pdf2pic.convert('./test/docs/pdf1.pdf')
.then(resolve =>
expect(resolve.size).to.be.above(0)
)
})

it('should convert pdf1 second page', function () {
this.timeout(1000000)
return pdf2pic.convert('./test/docs/pdf1.pdf', 2)
.then(resolve =>
expect(resolve.size).to.be.above(0)
)
})

it("should convert pdf1 all pages", function () {
pdf2pic.convertBulk('./test/docs/pdf1.pdf', -1)
it('should convert pdf1 page 1, 5 and 8', function () {
this.timeout(1000000)
return pdf2pic.convertBulk('./test/docs/pdf1.pdf', [1, 5, 8])
.then(resolve =>
expect(resolve.length).to.be.above(0)
expect(resolve.length).to.be.equal(3)
)
})

it('should convert pdf1 page 1, 5 and 8', function () {
return pdf2pic.convertBulk('./test/docs/pdf1.pdf', [1, 5, 8])
it("should convert pdf1 all pages", function () {
this.timeout(1000000)
pdf2pic.convertBulk('./test/docs/pdf1.pdf', -1)
.then(resolve =>
expect(resolve.length).to.be.equal(3)
expect(resolve.length).to.be.above(0)
)
})

it('should convert pdf1 first page to base64', function () {
this.timeout(1000000)
return pdf2pic.convertToBase64('./test/docs/pdf1.pdf')
.then(resolve =>
expect(resolve.page).to.be.above(0)
Expand Down

0 comments on commit f1285e6

Please sign in to comment.