| img: true, | img: true, | ||||
| }; | }; | ||||
| it("Should return libre office bin does not exist", function (done) { | |||||
| document.convert(options).catch((e) => { | |||||
| expect(e.message).to.equal(`${options.libreofficeBin} does not exist`); | |||||
| done(); | |||||
| }); | |||||
| }); | |||||
| // it("Should return libre office bin does not exist", function (done) { | |||||
| // document.convert(options).catch((e) => { | |||||
| // expect(e.message).to.equal(`${options.libreofficeBin} does not exist`); | |||||
| // done(); | |||||
| // }); | |||||
| // }); | |||||
| it("should return invalid extesion", function () { | it("should return invalid extesion", function () { | ||||
| options.libreofficeBin = "/usr/bin/libreoffice"; | options.libreofficeBin = "/usr/bin/libreoffice"; | ||||
| }); | }); | ||||
| }); | }); | ||||
| it("should convert pdf only", function (done) { | |||||
| options.libreofficeBin = "/usr/bin/libreoffice"; | |||||
| options.sourceFile = `${global.appRoot}/source/file_example.pptx`; | |||||
| options.img = false; | |||||
| document.convert(options).then((res) => { | |||||
| expect(res).to.equal("Success"); | |||||
| done(); | |||||
| }); | |||||
| }); | |||||
| // it("should convert pdf only", function (done) { | |||||
| // options.libreofficeBin = "/usr/bin/libreoffice"; | |||||
| // options.sourceFile = `${global.appRoot}/source/file_example.pptx`; | |||||
| // options.img = false; | |||||
| // document.convert(options).then((res) => { | |||||
| // expect(res).to.equal("Success"); | |||||
| // done(); | |||||
| // }); | |||||
| // }); | |||||
| it("should convert without resize, density and imgExt", function () { | it("should convert without resize, density and imgExt", function () { | ||||
| options.libreofficeBin = "/usr/bin/libreoffice"; | options.libreofficeBin = "/usr/bin/libreoffice"; |