aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2016-06-28 21:51:50 +0100
committerMichael Williamson <mike@zwobble.org>2016-06-28 21:51:50 +0100
commit4b13398d9f4fc303d22fc24aac519113941b032c (patch)
tree7422aa51b30de16ff9a90fb8863f1503ef755642 /tests
parentd046c4297a04b6eecadf01093382b72bb1b71032 (diff)
Add stylistic eslint rules
Diffstat (limited to 'tests')
-rw-r--r--tests/docx/files.tests.js4
-rw-r--r--tests/main.tests.js4
-rw-r--r--tests/mammoth.tests.js2
3 files changed, 6 insertions, 4 deletions
diff --git a/tests/docx/files.tests.js b/tests/docx/files.tests.js
index 10751d4..2a0919c 100644
--- a/tests/docx/files.tests.js
+++ b/tests/docx/files.tests.js
@@ -74,7 +74,9 @@ describe("uriToPath", function() {
});
test("when host is set but not localhost then path cannot be found", function() {
- assert.throws(function() { uriToPath("file://example/a/b/c"); }, /Could not convert URI to path: file:\/\/example\/a\/b\/c/);
+ assert.throws(function() {
+ uriToPath("file://example/a/b/c");
+ }, /Could not convert URI to path: file:\/\/example\/a\/b\/c/);
});
test("leading slash is not dropped on Windows file URIs when platform is not Windows", function() {
diff --git a/tests/main.tests.js b/tests/main.tests.js
index 5b54441..d603626 100644
--- a/tests/main.tests.js
+++ b/tests/main.tests.js
@@ -1,5 +1,5 @@
var assert = require("assert");
-var child_process = require("child_process");
+var child_process = require("child_process"); // eslint-disable-line camelcase
var path = require("path");
var fs = require("fs");
@@ -77,7 +77,7 @@ function runMammoth() {
var processArgs = ["node", "bin/mammoth"].concat(args);
// TODO: proper escaping of args
var command = processArgs.join(" ");
- child_process.exec(command, function(error, stdout, stderr) {
+ child_process.exec(command, function(error, stdout, stderr) { // eslint-disable-line camelcase
console.log(stderr); // eslint-disable-line no-console
assert.equal(error, null);
deferred.resolve({output: stdout, stderrOutput: stderr});
diff --git a/tests/mammoth.tests.js b/tests/mammoth.tests.js
index ad71539..1a82014 100644
--- a/tests/mammoth.tests.js
+++ b/tests/mammoth.tests.js
@@ -36,7 +36,7 @@ describe('mammoth', function() {
test('should read docx xml files with unicode byte order mark', function() {
var docxPath = path.join(__dirname, "test-data/utf8-bom.docx");
- return mammoth.convertToHtml({path: docxPath}).then(function (result) {
+ return mammoth.convertToHtml({path: docxPath}).then(function(result) {
assert.equal(result.value, "<p>This XML has a byte order mark.</p>");
assert.deepEqual(result.messages, []);
});