Skip to content

Commit

Permalink
Enable the ESLint no-var rule in test/add_test.js
Browse files Browse the repository at this point in the history
These changes were done automatically, by using the `gulp lint --fix` command.
  • Loading branch information
Snuffleupagus committed Mar 14, 2021
1 parent c86f44f commit 7ec2bd0
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions test/add_test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable no-var */

const fs = require("fs");
const crypto = require("crypto");
const execSync = require("child_process").execSync;
Expand All @@ -25,16 +23,16 @@ if (!fs.existsSync(file)) {
}

function calculateMD5(pdfFile, callback) {
var hash = crypto.createHash("md5");
var stream = fs.createReadStream(pdfFile);
const hash = crypto.createHash("md5");
const stream = fs.createReadStream(pdfFile);
stream.on("data", function (data) {
hash.update(data);
});
stream.on("error", function (err) {
callback(err);
});
stream.on("end", function () {
var result = hash.digest("hex");
const result = hash.digest("hex");
callback(null, result);
});
}
Expand Down

0 comments on commit 7ec2bd0

Please sign in to comment.