Apply automatic eslint fixes

This commit is contained in:
Daniel García Aubert
2019-10-21 19:07:24 +02:00
parent 593d9e40f6
commit 4d70ac0894
246 changed files with 11782 additions and 11454 deletions
+9 -11
View File
@@ -5,21 +5,19 @@ require('../support/test-helper');
var assert = require('assert');
var errorMiddleware = require('../../lib/api/middlewares/error-middleware');
describe('error-middleware', function() {
it('different formats for postgis plugin error returns 400 as status code', function() {
describe('error-middleware', function () {
it('different formats for postgis plugin error returns 400 as status code', function () {
var expectedStatusCode = 400;
assert.equal(
errorMiddleware.findStatusCode("Postgis Plugin: ERROR: column \"missing\" does not exist\n"),
errorMiddleware.findStatusCode('Postgis Plugin: ERROR: column "missing" does not exist\n'),
expectedStatusCode,
"Error status code for single line does not match"
'Error status code for single line does not match'
);
assert.equal(
errorMiddleware.findStatusCode("Postgis Plugin: PSQL error:\nERROR: column \"missing\" does not exist\n"),
errorMiddleware.findStatusCode('Postgis Plugin: PSQL error:\nERROR: column "missing" does not exist\n'),
expectedStatusCode,
"Error status code for multiline/PSQL does not match"
'Error status code for multiline/PSQL does not match'
);
});
@@ -52,7 +50,7 @@ describe('error-middleware', function() {
name: error.name,
label: error.label,
type: error.type,
subtype: error.subtype,
subtype: error.subtype
},
moreErrors: [{
message: error.message,
@@ -104,7 +102,7 @@ describe('error-middleware', function() {
name: error.name,
label: error.label,
type: error.type,
subtype: error.subtype,
subtype: error.subtype
},
moreErrors: [{
message: error.message,
@@ -157,7 +155,7 @@ describe('error-middleware', function() {
name: error.name,
label: escapedString,
type: escapedString,
subtype: escapedString,
subtype: escapedString
},
moreErrors: [{
message: escapedString,