Commit 2b8c0ce5 by Edgar HIPP

Fix eslint

parent 3422a281
...@@ -8,7 +8,7 @@ const JSZip = require("jszip"); ...@@ -8,7 +8,7 @@ const JSZip = require("jszip");
const ImageModule = require("./index.js"); const ImageModule = require("./index.js");
const testutils = require("docxtemplater/js/tests/utils"); const testutils = require("docxtemplater/js/tests/utils");
const shouldBeSame = testutils.shouldBeSame; const shouldBeSame = testutils.shouldBeSame;
const sizeOf = require('image-size'); const sizeOf = require("image-size");
const fileNames = [ const fileNames = [
"imageExample.docx", "imageExample.docx",
...@@ -28,7 +28,7 @@ const fileNames = [ ...@@ -28,7 +28,7 @@ const fileNames = [
"expectedTagImage.pptx", "expectedTagImage.pptx",
"tagImageCentered.pptx", "tagImageCentered.pptx",
"expectedTagImageCentered.pptx", "expectedTagImageCentered.pptx",
"expectedInlineResize.docx" "expectedInlineResize.docx",
]; ];
beforeEach(function () { beforeEach(function () {
...@@ -43,7 +43,7 @@ beforeEach(function () { ...@@ -43,7 +43,7 @@ beforeEach(function () {
}; };
this.loadAndRender = function () { this.loadAndRender = function () {
const file = testutils.createDoc(this.name) const file = testutils.createDoc(this.name);
this.doc = new Docxtemplater(); this.doc = new Docxtemplater();
const inputZip = new JSZip(file.loadedContent); const inputZip = new JSZip(file.loadedContent);
this.doc.loadZip(inputZip).setData(this.data); this.doc.loadZip(inputZip).setData(this.data);
...@@ -125,10 +125,10 @@ function testStart() { ...@@ -125,10 +125,10 @@ function testStart() {
it("should work with auto resize", function () { it("should work with auto resize", function () {
this.name = "imageInlineExample.docx"; this.name = "imageInlineExample.docx";
this.expectedName = "expectedInlineResize.docx"; this.expectedName = "expectedInlineResize.docx";
this.opts.getSize = function (img, tagValue, tagName) { this.opts.getSize = function (img) {
const sizeObj = sizeOf(img); const sizeObj = sizeOf(img);
return [sizeObj.width, sizeObj.height]; return [sizeObj.width, sizeObj.height];
} };
this.data = {firefox: "examples/image.png"}; this.data = {firefox: "examples/image.png"};
this.loadAndRender(); this.loadAndRender();
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment