Stop using __dirname in requires
This commit is contained in:
parent
e8cff194fc
commit
98f3e8159e
@ -7,7 +7,7 @@ var step = require('step');
|
||||
var FastlyPurge = require('fastly-purge');
|
||||
var _ = require('underscore');
|
||||
var NamedMapsCacheEntry = require('../../../lib/cache/model/named-maps-entry');
|
||||
var CartodbWindshaft = require(__dirname + '/../../../lib/server');
|
||||
var CartodbWindshaft = require('../../../lib/server');
|
||||
var nock = require('nock');
|
||||
|
||||
describe('templates surrogate keys', function() {
|
||||
|
@ -3,9 +3,9 @@
|
||||
var assert = require('../support/assert');
|
||||
var step = require('step');
|
||||
var LayergroupToken = require('../../lib/models/layergroup-token');
|
||||
var testHelper = require(__dirname + '/../support/test-helper');
|
||||
var CartodbWindshaft = require(__dirname + '/../../lib/server');
|
||||
var serverOptions = require(__dirname + '/../../lib/server-options');
|
||||
var testHelper = require('../support/test-helper');
|
||||
var CartodbWindshaft = require('../../lib/server');
|
||||
var serverOptions = require('../../lib/server-options');
|
||||
|
||||
describe('dynamic styling for named maps', function() {
|
||||
var server;
|
||||
|
@ -1,8 +1,8 @@
|
||||
'use strict';
|
||||
|
||||
var assert = require('../support/assert');
|
||||
var CartodbWindshaft = require(__dirname + '/../../lib/server');
|
||||
var serverOptions = require(__dirname + '/../../lib/server-options');
|
||||
var CartodbWindshaft = require('../../lib/server');
|
||||
var serverOptions = require('../../lib/server-options');
|
||||
|
||||
describe('error with context', function () {
|
||||
var server;
|
||||
|
@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
require(__dirname + '/../support/test-helper');
|
||||
require('../support/test-helper');
|
||||
|
||||
var fs = require('fs');
|
||||
|
||||
|
@ -10,7 +10,7 @@ var redis_stats_db = 5;
|
||||
var mapnik = require('windshaft').mapnik;
|
||||
var semver = require('semver');
|
||||
|
||||
var helper = require(__dirname + '/../support/test-helper');
|
||||
var helper = require('../support/test-helper');
|
||||
var LayergroupToken = require('../../lib/models/layergroup-token');
|
||||
|
||||
var windshaft_fixtures = __dirname + '/../../node_modules/windshaft/test/fixtures';
|
||||
|
@ -4,8 +4,8 @@ var step = require('step');
|
||||
var test_helper = require('../support/test-helper');
|
||||
|
||||
var assert = require('../support/assert');
|
||||
var CartodbWindshaft = require(__dirname + '/../../lib/server');
|
||||
var serverOptions = require(__dirname + '/../../lib/server-options');
|
||||
var CartodbWindshaft = require('../../lib/server');
|
||||
var serverOptions = require('../../lib/server-options');
|
||||
|
||||
var RedisPool = require('redis-mpool');
|
||||
var TemplateMaps = require('../../lib/backends/template-maps');
|
||||
|
@ -3,8 +3,8 @@
|
||||
var test_helper = require('../support/test-helper');
|
||||
|
||||
var assert = require('../support/assert');
|
||||
var CartodbWindshaft = require(__dirname + '/../../lib/server');
|
||||
var serverOptions = require(__dirname + '/../../lib/server-options');
|
||||
var CartodbWindshaft = require('../../lib/server');
|
||||
var serverOptions = require('../../lib/server-options');
|
||||
|
||||
var LayergroupToken = require('../../lib/models/layergroup-token');
|
||||
|
||||
|
@ -6,8 +6,8 @@ var querystring = require('querystring');
|
||||
|
||||
var assert = require('../support/assert');
|
||||
var mapnik = require('windshaft').mapnik;
|
||||
var CartodbWindshaft = require(__dirname + '/../../lib/server');
|
||||
var serverOptions = require(__dirname + '/../../lib/server-options');
|
||||
var CartodbWindshaft = require('../../lib/server');
|
||||
var serverOptions = require('../../lib/server-options');
|
||||
var TemplateMaps = require('../../lib/backends/template-maps');
|
||||
var NamedMapsCacheEntry = require('../../lib/cache/model/named-maps-entry');
|
||||
|
||||
|
@ -6,8 +6,8 @@ var querystring = require('querystring');
|
||||
|
||||
var assert = require('../support/assert');
|
||||
var mapnik = require('windshaft').mapnik;
|
||||
var CartodbWindshaft = require(__dirname + '/../../lib/server');
|
||||
var serverOptions = require(__dirname + '/../../lib/server-options');
|
||||
var CartodbWindshaft = require('../../lib/server');
|
||||
var serverOptions = require('../../lib/server-options');
|
||||
var TemplateMaps = require('../../lib/backends/template-maps');
|
||||
var NamedMapsCacheEntry = require('../../lib/cache/model/named-maps-entry');
|
||||
|
||||
|
@ -3,8 +3,8 @@
|
||||
var test_helper = require('../support/test-helper');
|
||||
|
||||
var assert = require('../support/assert');
|
||||
var CartodbWindshaft = require(__dirname + '/../../lib/server');
|
||||
var serverOptions = require(__dirname + '/../../lib/server-options');
|
||||
var CartodbWindshaft = require('../../lib/server');
|
||||
var serverOptions = require('../../lib/server-options');
|
||||
|
||||
var LayergroupToken = require('../../lib/models/layergroup-token');
|
||||
|
||||
|
@ -3,8 +3,8 @@
|
||||
var test_helper = require('../support/test-helper');
|
||||
|
||||
var assert = require('../support/assert');
|
||||
var CartodbWindshaft = require(__dirname + '/../../lib/server');
|
||||
var serverOptions = require(__dirname + '/../../lib/server-options');
|
||||
var CartodbWindshaft = require('../../lib/server');
|
||||
var serverOptions = require('../../lib/server-options');
|
||||
|
||||
var LayergroupToken = require('../../lib/models/layergroup-token');
|
||||
|
||||
|
@ -5,8 +5,8 @@ var assert = require('../support/assert');
|
||||
const helper = require('../support/test-helper');
|
||||
var TestClient = require('../support/test-client');
|
||||
const LayergroupToken = require('../../lib/models/layergroup-token');
|
||||
const CartodbWindshaft = require(__dirname + '/../../lib/server');
|
||||
const serverOptions = require(__dirname + '/../../lib/server-options');
|
||||
const CartodbWindshaft = require('../../lib/server');
|
||||
const serverOptions = require('../../lib/server-options');
|
||||
|
||||
describe('regressions', function() {
|
||||
|
||||
|
@ -18,10 +18,10 @@ process.env.PGHOST = 'fake';
|
||||
var fs = require('fs');
|
||||
var http = require('http');
|
||||
|
||||
var helper = require(__dirname + '/../support/test-helper');
|
||||
var helper = require('../support/test-helper');
|
||||
|
||||
var CartodbWindshaft = require(__dirname + '/../../lib/server');
|
||||
var serverOptions = require(__dirname + '/../../lib/server-options');
|
||||
var CartodbWindshaft = require('../../lib/server');
|
||||
var serverOptions = require('../../lib/server-options');
|
||||
|
||||
var LayergroupToken = require('../../lib/models/layergroup-token');
|
||||
|
||||
|
@ -18,7 +18,7 @@ var log4js = require('log4js');
|
||||
const setICUEnvVariable = require('../../lib/utils/icu-data-env-setter');
|
||||
|
||||
// set environment specific variables
|
||||
global.environment = require(__dirname + '/../../config/environments/test');
|
||||
global.environment = require('../../config/environments/test');
|
||||
global.environment.name = 'test';
|
||||
process.env.NODE_ENV = 'test';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user