diff --git a/test/acceptance/analysis/analyses-controller-test.js b/test/acceptance/analysis/analyses-controller-test.js index e565a2e4..31526480 100644 --- a/test/acceptance/analysis/analyses-controller-test.js +++ b/test/acceptance/analysis/analyses-controller-test.js @@ -59,14 +59,13 @@ describe('analyses controller', function () { assert.ok(result); let didRunJsonCallback = false; - // jshint ignore:start + /* eslint-disable no-unused-vars, no-eval */ function jsonp_test (body) { assert.ok(Array.isArray(body.catalog)); didRunJsonCallback = true; } - eval(result); - // jshint ignore:end + /* eslint-enable */ assert.ok(didRunJsonCallback); diff --git a/test/acceptance/label-wrap-test.js b/test/acceptance/label-wrap-test.js index 0b26297c..d13ea4e6 100644 --- a/test/acceptance/label-wrap-test.js +++ b/test/acceptance/label-wrap-test.js @@ -48,12 +48,6 @@ describe('CartoCSS wrap', function () { ] }; - var keysToDelete; - - beforeEach(function () { - keysToDelete = {}; - }); - afterEach(function (done) { if (this.testClient) { this.testClient.drain(done); diff --git a/test/acceptance/ported/multilayer-test.js b/test/acceptance/ported/multilayer-test.js index 615e53eb..6f8f802c 100644 --- a/test/acceptance/ported/multilayer-test.js +++ b/test/acceptance/ported/multilayer-test.js @@ -405,7 +405,7 @@ describe('multilayer', function () { assert.strictEqual(res.statusCode, 200, res.body); var didRunJsonCallback = false; - // jshint ignore:start + /* eslint-disable no-unused-vars, no-eval */ function jsonp_test (body) { assert.ok(body.layergroupid); expected_token = LayergroupToken.parse(body.layergroupid).token; @@ -417,7 +417,7 @@ describe('multilayer', function () { didRunJsonCallback = true; } eval(res.body); - // jshint ignore:end + /* eslint-enable */ assert.ok(didRunJsonCallback); // TODO: check caching headers ! diff --git a/test/acceptance/ported/server-test.js b/test/acceptance/ported/server-test.js index 9ca324a1..cb02a211 100644 --- a/test/acceptance/ported/server-test.js +++ b/test/acceptance/ported/server-test.js @@ -72,13 +72,13 @@ describe('server', function () { assert.deepStrictEqual(res.headers['content-type'], 'text/javascript; charset=utf-8'); var didRunJsonCallback = false; var response = {}; - // jshint ignore:start + /* eslint-disable no-unused-vars, no-eval */ function jsonp_test (body) { response = body; didRunJsonCallback = true; } eval(res.body); - // jshint ignore:end + /* eslint-enable */ assert.ok(didRunJsonCallback); assert.utfgridEqualsFile(response, './test/fixtures/test_table_13_4011_3088.grid.json', 2, done); }); diff --git a/test/acceptance/templates-test.js b/test/acceptance/templates-test.js index 69a5a79a..0ae93e7a 100644 --- a/test/acceptance/templates-test.js +++ b/test/acceptance/templates-test.js @@ -1382,12 +1382,13 @@ describe('template_api', function () { ].join(' '); helper.checkSurrogateKey(res, expectedSurrogateKey); - // jshint ignore:start + /* eslint-disable no-unused-vars, no-eval */ function json_test (body) { keysToDelete['map_cfg|' + LayergroupToken.parse(body.layergroupid).token] = 0; } eval(res.body); - // jshint ignore:end + /* eslint-enable */ + keysToDelete['map_tpl|localhost'] = 0; keysToDelete['user:localhost:mapviews:global'] = 5; @@ -1467,12 +1468,13 @@ describe('template_api', function () { ].join(' '); helper.checkSurrogateKey(res, expectedSurrogateKey); - // jshint ignore:start + /* eslint-disable no-unused-vars, no-eval */ function json_test (body) { keysToDelete['map_cfg|' + LayergroupToken.parse(body.layergroupid).token] = 0; } eval(res.body); - // jshint ignore:end + /* eslint-enable */ + keysToDelete['map_tpl|localhost'] = 0; keysToDelete['user:localhost:mapviews:global'] = 5;