Replace assert.deepEqual() by assert.deepStrictEqual()
This commit is contained in:
@@ -30,7 +30,7 @@ describe('torque-layer-stats', function () {
|
||||
var testSubject = new TorqueLayerStats();
|
||||
testSubject.getStats(layer, {}, function (err, result) {
|
||||
assert.ifError(err);
|
||||
assert.deepEqual({}, result);
|
||||
assert.deepStrictEqual({}, result);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -38,7 +38,7 @@ describe('turbo-carto-postgres-datasource', function () {
|
||||
stats: { min_val: 3, max_val: 999, avg_val: 501 },
|
||||
strategy: undefined
|
||||
};
|
||||
assert.deepEqual(result, expected_result);
|
||||
assert.deepStrictEqual(result, expected_result);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -64,7 +64,7 @@ describe('error-middleware', function () {
|
||||
const errorFn = errorMiddleware();
|
||||
errorFn(errors, req, res);
|
||||
|
||||
assert.deepEqual(res.headers, {
|
||||
assert.deepStrictEqual(res.headers, {
|
||||
'X-Tiler-Errors': JSON.stringify(errorHeader)
|
||||
});
|
||||
|
||||
@@ -116,7 +116,7 @@ describe('error-middleware', function () {
|
||||
const errorFn = errorMiddleware();
|
||||
errorFn(errors, req, res);
|
||||
|
||||
assert.deepEqual(res.headers, {
|
||||
assert.deepStrictEqual(res.headers, {
|
||||
'X-Tiler-Errors': JSON.stringify(errorHeader)
|
||||
});
|
||||
|
||||
@@ -169,7 +169,7 @@ describe('error-middleware', function () {
|
||||
const errorFn = errorMiddleware();
|
||||
errorFn(errors, req, res);
|
||||
|
||||
assert.deepEqual(res.headers, {
|
||||
assert.deepStrictEqual(res.headers, {
|
||||
'X-Tiler-Errors': JSON.stringify(errorHeader)
|
||||
});
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ describe('lzma-middleware', function () {
|
||||
return done(err);
|
||||
}
|
||||
var query = req.query;
|
||||
assert.deepEqual(qo.config, query.config);
|
||||
assert.deepStrictEqual(qo.config, query.config);
|
||||
assert.strictEqual('test', query.api_key);
|
||||
done();
|
||||
});
|
||||
|
||||
@@ -250,7 +250,7 @@ describe('dataviews-widgets-adapter', function () {
|
||||
widgetsMapConfigs.forEach(function (mapConfig, index) {
|
||||
it('should adapt widgets ' + index, function (done) {
|
||||
dataviewsMapConfigAdapter.getMapConfig(user, mapConfig.input, params(), context(), function (err, result) {
|
||||
assert.deepEqual(result, mapConfig.expected);
|
||||
assert.deepStrictEqual(result, mapConfig.expected);
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -57,7 +57,7 @@ describe('Bounding box filter', function () {
|
||||
var bbox = [-90, -45, 90, 45];
|
||||
var bboxFilter = createFilter(bbox);
|
||||
assert.strictEqual(bboxFilter.bboxes.length, 1);
|
||||
assert.deepEqual(bboxFilter.bboxes[0], createRef(bbox));
|
||||
assert.deepStrictEqual(bboxFilter.bboxes[0], createRef(bbox));
|
||||
});
|
||||
|
||||
describe('latitude', function () {
|
||||
@@ -65,14 +65,14 @@ describe('Bounding box filter', function () {
|
||||
var bbox = [-180, -90, 180, 90];
|
||||
var bboxFilter = createFilter(bbox);
|
||||
assert.strictEqual(bboxFilter.bboxes.length, 1);
|
||||
assert.deepEqual(bboxFilter.bboxes[0], MAX_EXTENT_MERCATOR_REF);
|
||||
assert.deepStrictEqual(bboxFilter.bboxes[0], MAX_EXTENT_MERCATOR_REF);
|
||||
});
|
||||
|
||||
it('clipping out of bounds', function () {
|
||||
var bbox = [-180, -90, 180, 90];
|
||||
var bboxFilter = createFilter(bbox);
|
||||
assert.strictEqual(bboxFilter.bboxes.length, 1);
|
||||
assert.deepEqual(
|
||||
assert.deepStrictEqual(
|
||||
bboxFilter.bboxes[0],
|
||||
createRef([-180, -BboxFilter.LATITUDE_MAX_VALUE, 180, BboxFilter.LATITUDE_MAX_VALUE])
|
||||
);
|
||||
@@ -86,11 +86,11 @@ describe('Bounding box filter', function () {
|
||||
|
||||
assert.strictEqual(bboxFilter.bboxes.length, 2, JSON.stringify([bboxFilter.bboxes, bbox]));
|
||||
|
||||
assert.deepEqual(
|
||||
assert.deepStrictEqual(
|
||||
bboxFilter.bboxes[0],
|
||||
createRef([90, -45, 180, 45])
|
||||
);
|
||||
assert.deepEqual(
|
||||
assert.deepStrictEqual(
|
||||
bboxFilter.bboxes[1],
|
||||
createRef([-180, -45, 0, 45])
|
||||
);
|
||||
@@ -102,11 +102,11 @@ describe('Bounding box filter', function () {
|
||||
|
||||
assert.strictEqual(bboxFilter.bboxes.length, 2);
|
||||
|
||||
assert.deepEqual(
|
||||
assert.deepStrictEqual(
|
||||
bboxFilter.bboxes[0],
|
||||
createRef([90, -45, 180, 45])
|
||||
);
|
||||
assert.deepEqual(
|
||||
assert.deepStrictEqual(
|
||||
bboxFilter.bboxes[1],
|
||||
createRef([-180, -45, 0, 45])
|
||||
);
|
||||
@@ -118,11 +118,11 @@ describe('Bounding box filter', function () {
|
||||
|
||||
assert.strictEqual(bboxFilter.bboxes.length, 2);
|
||||
|
||||
assert.deepEqual(
|
||||
assert.deepStrictEqual(
|
||||
bboxFilter.bboxes[0],
|
||||
createRef([90, -45, 180, 45])
|
||||
);
|
||||
assert.deepEqual(
|
||||
assert.deepStrictEqual(
|
||||
bboxFilter.bboxes[1],
|
||||
createRef([-180, -45, -170, 45])
|
||||
);
|
||||
@@ -136,7 +136,7 @@ describe('Bounding box filter', function () {
|
||||
|
||||
assert.strictEqual(bboxFilter.bboxes.length, 1);
|
||||
|
||||
assert.deepEqual(
|
||||
assert.deepStrictEqual(
|
||||
bboxFilter.bboxes[0],
|
||||
createRef([-180, -45, 180, 45])
|
||||
);
|
||||
|
||||
@@ -45,11 +45,11 @@ describe('ResourceLocator', function () {
|
||||
var urls = resourceLocator.getTileUrls(USERNAME, TILE_RESOURCE);
|
||||
assert.ok(urls);
|
||||
|
||||
assert.deepEqual(
|
||||
assert.deepStrictEqual(
|
||||
urls.http,
|
||||
[`http://cdn.carto.com/${USERNAME}/api/v1/map/${TILE_RESOURCE}`]
|
||||
);
|
||||
assert.deepEqual(
|
||||
assert.deepStrictEqual(
|
||||
urls.https,
|
||||
[`https://cdn.ssl.carto.com/${USERNAME}/api/v1/map/${TILE_RESOURCE}`]
|
||||
);
|
||||
@@ -62,11 +62,11 @@ describe('ResourceLocator', function () {
|
||||
var urls = resourceLocator.getTemplateUrls(USERNAME, TILE_RESOURCE);
|
||||
assert.ok(urls);
|
||||
|
||||
assert.deepEqual(urls.http, {
|
||||
assert.deepStrictEqual(urls.http, {
|
||||
urlTemplate: `http://cdn.carto.com/${USERNAME}/api/v1/map/${TILE_RESOURCE}`,
|
||||
subdomains: []
|
||||
});
|
||||
assert.deepEqual(urls.https, {
|
||||
assert.deepStrictEqual(urls.https, {
|
||||
urlTemplate: `https://cdn.ssl.carto.com/${USERNAME}/api/v1/map/${TILE_RESOURCE}`,
|
||||
subdomains: []
|
||||
});
|
||||
@@ -111,11 +111,11 @@ describe('ResourceLocator', function () {
|
||||
var urls = resourceLocator.getTileUrls(USERNAME, TILE_RESOURCE);
|
||||
assert.ok(urls);
|
||||
|
||||
assert.deepEqual(
|
||||
assert.deepStrictEqual(
|
||||
urls.http,
|
||||
[`http://${USERNAME}.localhost.lan/api/v1/map/${TILE_RESOURCE}`]
|
||||
);
|
||||
assert.deepEqual(
|
||||
assert.deepStrictEqual(
|
||||
urls.https,
|
||||
[`https://${USERNAME}.ssl.localhost.lan/api/v1/map/${TILE_RESOURCE}`]
|
||||
);
|
||||
@@ -128,11 +128,11 @@ describe('ResourceLocator', function () {
|
||||
var urls = resourceLocator.getTemplateUrls(USERNAME, TILE_RESOURCE);
|
||||
assert.ok(urls);
|
||||
|
||||
assert.deepEqual(urls.http, {
|
||||
assert.deepStrictEqual(urls.http, {
|
||||
urlTemplate: `http://${USERNAME}.localhost.lan/api/v1/map/${TILE_RESOURCE}`,
|
||||
subdomains: []
|
||||
});
|
||||
assert.deepEqual(urls.https, {
|
||||
assert.deepStrictEqual(urls.https, {
|
||||
urlTemplate: `https://${USERNAME}.ssl.localhost.lan/api/v1/map/${TILE_RESOURCE}`,
|
||||
subdomains: []
|
||||
});
|
||||
@@ -186,12 +186,12 @@ describe('ResourceLocator', function () {
|
||||
var urls = resourceLocator.getTileUrls(USERNAME, TILE_RESOURCE);
|
||||
assert.ok(urls);
|
||||
|
||||
assert.deepEqual(
|
||||
assert.deepStrictEqual(
|
||||
urls.http,
|
||||
HTTP_SUBDOMAINS
|
||||
.map(s => `http://${s}.cdn.carto.com/${USERNAME}/api/v1/map/${TILE_RESOURCE}`)
|
||||
);
|
||||
assert.deepEqual(
|
||||
assert.deepStrictEqual(
|
||||
urls.https,
|
||||
HTTPS_SUBDOMAINS
|
||||
.map(s => `https://cdn_${s}.ssl.cdn.carto.com/${USERNAME}/api/v1/map/${TILE_RESOURCE}`)
|
||||
@@ -205,11 +205,11 @@ describe('ResourceLocator', function () {
|
||||
var urls = resourceLocator.getTemplateUrls(USERNAME, TILE_RESOURCE);
|
||||
assert.ok(urls);
|
||||
|
||||
assert.deepEqual(urls.http, {
|
||||
assert.deepStrictEqual(urls.http, {
|
||||
urlTemplate: `http://{s}.cdn.carto.com/${USERNAME}/api/v1/map/${TILE_RESOURCE}`,
|
||||
subdomains: HTTP_SUBDOMAINS
|
||||
});
|
||||
assert.deepEqual(urls.https, {
|
||||
assert.deepStrictEqual(urls.https, {
|
||||
urlTemplate: `https://cdn_{s}.ssl.cdn.carto.com/${USERNAME}/api/v1/map/${TILE_RESOURCE}`,
|
||||
subdomains: HTTPS_SUBDOMAINS
|
||||
});
|
||||
@@ -267,12 +267,12 @@ describe('ResourceLocator', function () {
|
||||
var urls = resourceLocator.getTileUrls(USERNAME, TILE_RESOURCE);
|
||||
assert.ok(urls);
|
||||
|
||||
assert.deepEqual(
|
||||
assert.deepStrictEqual(
|
||||
urls.http,
|
||||
HTTP_SUBDOMAINS
|
||||
.map(s => `http://${s}.cdn.carto.com/u/${USERNAME}/api/v1/map/${TILE_RESOURCE}`)
|
||||
);
|
||||
assert.deepEqual(
|
||||
assert.deepStrictEqual(
|
||||
urls.https,
|
||||
HTTPS_SUBDOMAINS
|
||||
.map(s => `https://cdn_${s}.ssl.cdn.carto.com/u/${USERNAME}/api/v1/map/${TILE_RESOURCE}`)
|
||||
@@ -286,11 +286,11 @@ describe('ResourceLocator', function () {
|
||||
var urls = resourceLocator.getTemplateUrls(USERNAME, TILE_RESOURCE);
|
||||
assert.ok(urls);
|
||||
|
||||
assert.deepEqual(urls.http, {
|
||||
assert.deepStrictEqual(urls.http, {
|
||||
urlTemplate: `http://{s}.cdn.carto.com/u/${USERNAME}/api/v1/map/${TILE_RESOURCE}`,
|
||||
subdomains: HTTP_SUBDOMAINS
|
||||
});
|
||||
assert.deepEqual(urls.https, {
|
||||
assert.deepStrictEqual(urls.https, {
|
||||
urlTemplate: `https://cdn_{s}.ssl.cdn.carto.com/u/${USERNAME}/api/v1/map/${TILE_RESOURCE}`,
|
||||
subdomains: HTTPS_SUBDOMAINS
|
||||
});
|
||||
|
||||
@@ -165,7 +165,7 @@ describe('prepare-context', function () {
|
||||
return done(err);
|
||||
}
|
||||
|
||||
assert.deepEqual(config, req.query.config);
|
||||
assert.deepStrictEqual(config, req.query.config);
|
||||
assert.strictEqual('test', req.query.api_key);
|
||||
assert.strictEqual(undefined, req.query.non_included);
|
||||
done();
|
||||
|
||||
@@ -22,15 +22,15 @@ describe('SubstitutionTokens', function () {
|
||||
].join('\n');
|
||||
|
||||
it('should return tokens present in sql', function () {
|
||||
assert.deepEqual(SubstitutionTokens.tokens(sql), ['bbox', 'scale_denominator', 'pixel_width', 'pixel_height']);
|
||||
assert.deepStrictEqual(SubstitutionTokens.tokens(sql), ['bbox', 'scale_denominator', 'pixel_width', 'pixel_height']);
|
||||
});
|
||||
|
||||
it('should return just one token', function () {
|
||||
assert.deepEqual(SubstitutionTokens.tokens('select !bbox! from wadus'), ['bbox']);
|
||||
assert.deepStrictEqual(SubstitutionTokens.tokens('select !bbox! from wadus'), ['bbox']);
|
||||
});
|
||||
|
||||
it('should not return other tokens', function () {
|
||||
assert.deepEqual(SubstitutionTokens.tokens('select !wadus! from wadus'), []);
|
||||
assert.deepStrictEqual(SubstitutionTokens.tokens('select !wadus! from wadus'), []);
|
||||
});
|
||||
|
||||
it('should report sql has tokens', function () {
|
||||
|
||||
@@ -30,7 +30,7 @@ describe('TableNameParser', function () {
|
||||
var table_name = test_case[0];
|
||||
var expected_result = test_case[1];
|
||||
var result = TableNameParser.parse(table_name);
|
||||
assert.deepEqual(result, expected_result);
|
||||
assert.deepStrictEqual(result, expected_result);
|
||||
});
|
||||
done();
|
||||
});
|
||||
|
||||
@@ -94,8 +94,8 @@ describe('template_maps', function () {
|
||||
assert.ok(!err, 'Unexpected error adding template: ' + (err && err.message));
|
||||
assert.ok(testScenario.template !== template, 'template instances should be different');
|
||||
assert.strictEqual(template.name, templateName);
|
||||
assert.deepEqual(template.auth, testScenario.expected.auth);
|
||||
assert.deepEqual(template.placeholders, testScenario.expected.placeholders);
|
||||
assert.deepStrictEqual(template.auth, testScenario.expected.auth);
|
||||
assert.deepStrictEqual(template.placeholders, testScenario.expected.placeholders);
|
||||
|
||||
templateMaps.delTemplate(owner, templateName, done);
|
||||
});
|
||||
|
||||
@@ -252,7 +252,7 @@ describe('template_maps', function () {
|
||||
},
|
||||
function delTemplate (err, got_tpl) {
|
||||
assert.ifError(err);
|
||||
assert.deepEqual(got_tpl, _.extend({}, tpl, { auth: { method: 'open' }, placeholders: {} }));
|
||||
assert.deepStrictEqual(got_tpl, _.extend({}, tpl, { auth: { method: 'open' }, placeholders: {} }));
|
||||
tmap.delTemplate('me', tpl_id, this);
|
||||
},
|
||||
function finish (err) {
|
||||
@@ -603,7 +603,7 @@ describe('template_maps', function () {
|
||||
templateMaps.on('update', function (_owner, _templateName, _template) {
|
||||
assert.strictEqual(_owner, owner);
|
||||
assert.strictEqual(_templateName, templateName);
|
||||
assert.deepEqual(_template, templateUpdated);
|
||||
assert.deepStrictEqual(_template, templateUpdated);
|
||||
|
||||
templateMaps.delTemplate(owner, templateName, done);
|
||||
});
|
||||
@@ -611,7 +611,7 @@ describe('template_maps', function () {
|
||||
templateMaps.addTemplate(owner, template, function (err, templateName, _template) {
|
||||
assert.ok(!err, err);
|
||||
|
||||
assert.deepEqual(_template, template);
|
||||
assert.deepStrictEqual(_template, template);
|
||||
templateMaps.updTemplate(owner, templateName, templateUpdated, function () {});
|
||||
});
|
||||
});
|
||||
@@ -627,7 +627,7 @@ describe('template_maps', function () {
|
||||
templateMaps.addTemplate(owner, template, function (err, templateName, _template) {
|
||||
assert.ok(!err, err);
|
||||
|
||||
assert.deepEqual(_template, template);
|
||||
assert.deepStrictEqual(_template, template);
|
||||
templateMaps.delTemplate(owner, templateName, function () {});
|
||||
});
|
||||
});
|
||||
@@ -636,14 +636,14 @@ describe('template_maps', function () {
|
||||
templateMaps.on('update', function (_owner, _templateName, _template) {
|
||||
assert.strictEqual(_owner, owner);
|
||||
assert.strictEqual(_templateName, templateName);
|
||||
assert.deepEqual(_template, templateUpdated);
|
||||
assert.deepStrictEqual(_template, templateUpdated);
|
||||
|
||||
templateMaps.delTemplate(owner, templateName, done);
|
||||
});
|
||||
|
||||
templateMaps.addTemplate(owner, template, function (err, templateName, _template) {
|
||||
assert.ok(!err, err);
|
||||
assert.deepEqual(_template, template);
|
||||
assert.deepStrictEqual(_template, template);
|
||||
|
||||
templateMaps.updTemplate(owner, templateName, template, function () {
|
||||
templateMaps.updTemplate(owner, templateName, templateUpdated, function () {});
|
||||
|
||||
Reference in New Issue
Block a user