Stop using deprecated Buffer constructor

This commit is contained in:
Daniel García Aubert 2019-10-21 20:05:51 +02:00
parent 2423b5a4c4
commit d89e785440
18 changed files with 44 additions and 44 deletions

View File

@ -11,7 +11,7 @@ module.exports = function lzma () {
} }
// Decode (from base64) // Decode (from base64)
var lzma = new Buffer(req.query.lzma, 'base64') var lzma = Buffer.from(req.query.lzma, 'base64')
.toString('binary') .toString('binary')
.split('') .split('')
.map(function (c) { .map(function (c) {

View File

@ -6,7 +6,7 @@ if (process.argv.length !== 3) {
var LZMA = require('lzma').LZMA; var LZMA = require('lzma').LZMA;
var lzmaWorker = new LZMA(); var lzmaWorker = new LZMA();
var lzmaInput = decodeURIComponent(process.argv[2]); var lzmaInput = decodeURIComponent(process.argv[2]);
var lzmaBuffer = new Buffer(lzmaInput, 'base64') var lzmaBuffer = Buffer.from(lzmaInput, 'base64')
.toString('binary') .toString('binary')
.split('') .split('')
.map(function(c) { .map(function(c) {

View File

@ -1124,7 +1124,7 @@ describe('histogram-dataview for date column type', function() {
self.testClient.getDataview('minute_histogram', params, function (err, dataviewWithOffset) { self.testClient.getDataview('minute_histogram', params, function (err, dataviewWithOffset) {
assert.ifError(err); assert.ifError(err);
assert.notEqual(dataview.offset, dataviewWithOffset.offset); assert.notStrictEqual(dataview.offset, dataviewWithOffset.offset);
dataview.offset = dataviewWithOffset.offset; dataview.offset = dataviewWithOffset.offset;
assert.deepStrictEqual(dataview, dataviewWithOffset); assert.deepStrictEqual(dataview, dataviewWithOffset);
done(); done();
@ -1158,7 +1158,7 @@ describe('histogram-dataview for date column type', function() {
function (err, filteredWithOffsetDataview) { function (err, filteredWithOffsetDataview) {
assert.ifError(err); assert.ifError(err);
assert.notEqual(filteredWithOffsetDataview.offset, filteredDataview.offset); assert.notStrictEqual(filteredWithOffsetDataview.offset, filteredDataview.offset);
filteredWithOffsetDataview.offset = filteredDataview.offset; filteredWithOffsetDataview.offset = filteredDataview.offset;
assert.deepStrictEqual(filteredWithOffsetDataview, filteredDataview); assert.deepStrictEqual(filteredWithOffsetDataview, filteredDataview);
done(); done();

View File

@ -310,7 +310,7 @@ var QueryTables = require('cartodb-query-tables').queryTables;
method: 'GET', method: 'GET',
headers: { host: 'localhost' } headers: { host: 'localhost' }
}, {}, function (res) { }, {}, function (res) {
assert.notEqual(res.statusCode, 200); assert.notStrictEqual(res.statusCode, 200);
helper.checkNoCache(res); helper.checkNoCache(res);
done(); done();
}); });
@ -335,7 +335,7 @@ var QueryTables = require('cartodb-query-tables').queryTables;
method: 'GET', method: 'GET',
headers: { host: 'localhost' } headers: { host: 'localhost' }
}, {}, function (res) { }, {}, function (res) {
assert.notEqual(res.statusCode, 200); assert.notStrictEqual(res.statusCode, 200);
helper.checkNoCache(res); helper.checkNoCache(res);
done(); done();
}); });

View File

@ -195,7 +195,7 @@ describe('layers visibility for previews', function () {
assert.ifError(err); assert.ifError(err);
var next = this; var next = this;
var img = mapnik.Image.fromBytes(new Buffer(res.body, 'binary')); var img = mapnik.Image.fromBytes(Buffer.from(res.body, 'binary'));
var previewFixturePath = previewFixture(scenario.name); var previewFixturePath = previewFixture(scenario.name);
assert.imageIsSimilarToFile(img, previewFixturePath, IMAGE_TOLERANCE, next); assert.imageIsSimilarToFile(img, previewFixturePath, IMAGE_TOLERANCE, next);

View File

@ -161,7 +161,7 @@ describe('named maps authentication', function () {
function (res, err) { function (res, err) {
var img; var img;
if (!err && res.headers['content-type'] === 'image/png') { if (!err && res.headers['content-type'] === 'image/png') {
img = mapnik.Image.fromBytes(new Buffer(res.body, 'binary')); img = mapnik.Image.fromBytes(Buffer.from(res.body, 'binary'));
} }
return callback(err, res, img); return callback(err, res, img);
} }
@ -230,7 +230,7 @@ describe('named maps authentication', function () {
function (res, err) { function (res, err) {
var img; var img;
if (!err && res.headers['content-type'] === 'image/png') { if (!err && res.headers['content-type'] === 'image/png') {
img = mapnik.Image.fromBytes(new Buffer(res.body, 'binary')); img = mapnik.Image.fromBytes(Buffer.from(res.body, 'binary'));
} }
return callback(err, res, img); return callback(err, res, img);
} }

View File

@ -90,7 +90,7 @@ describe('named maps static view', function () {
assert.response(server, requestOptions, expectedResponse, function (res, err) { assert.response(server, requestOptions, expectedResponse, function (res, err) {
testHelper.deleteRedisKeys({ 'user:localhost:mapviews:global': 5 }, function () { testHelper.deleteRedisKeys({ 'user:localhost:mapviews:global': 5 }, function () {
return callback(err, mapnik.Image.fromBytes(new Buffer(res.body, 'binary'))); return callback(err, mapnik.Image.fromBytes(Buffer.from(res.body, 'binary')));
}); });
}); });
} }

View File

@ -92,7 +92,7 @@ describe('named maps preview stats', function () {
function (res, err) { function (res, err) {
var img; var img;
if (!err && res.headers['content-type'] === 'image/png') { if (!err && res.headers['content-type'] === 'image/png') {
img = mapnik.Image.fromBytes(new Buffer(res.body, 'binary')); img = mapnik.Image.fromBytes(Buffer.from(res.body, 'binary'));
} }
return callback(err, res, img); return callback(err, res, img);
} }

View File

@ -91,7 +91,7 @@ describe('retina support', function () {
function (res, err) { function (res, err) {
assert.ok(!err, 'Failed to request 0/0/0' + scaleFactor + '.png tile'); assert.ok(!err, 'Failed to request 0/0/0' + scaleFactor + '.png tile');
var image = new mapnik.Image.fromBytes(new Buffer(res.body, 'binary')); var image = new mapnik.Image.fromBytes(Buffer.from(res.body, 'binary'));
assert.strictEqual(image.width(), imageSize); assert.strictEqual(image.width(), imageSize);
assert.strictEqual(image.height(), imageSize); assert.strictEqual(image.height(), imageSize);

View File

@ -404,7 +404,7 @@ function getGeneric (layergroupConfig, url, expectedResponse, callback) {
var img; var img;
if (contentType === pngContentType) { if (contentType === pngContentType) {
img = new mapnik.Image.fromBytesSync(new Buffer(res.body, 'binary')); img = new mapnik.Image.fromBytesSync(Buffer.from(res.body, 'binary'));
} }
var keysToDelete = { var keysToDelete = {

View File

@ -128,7 +128,7 @@ describe('regressions', function () {
const timestampA = parseInt(cacheBusterA, 10); const timestampA = parseInt(cacheBusterA, 10);
const timestampB = parseInt(cacheBusterB, 10); const timestampB = parseInt(cacheBusterB, 10);
assert.notEqual(timestampA, timestampB); assert.notStrictEqual(timestampA, timestampB);
assert.ok(timestampA < timestampB, `timestampA: ${timestampA} > timestampB:${timestampB}`); assert.ok(timestampA < timestampB, `timestampA: ${timestampA} > timestampB:${timestampB}`);
testClient.drain(done); testClient.drain(done);

View File

@ -166,7 +166,7 @@ describe('turbo-carto for named maps', function () {
assert.strictEqual(res.headers['content-type'], 'image/png'); assert.strictEqual(res.headers['content-type'], 'image/png');
var fixturePath = './test/fixtures/turbo-carto-named-maps-reds.png'; var fixturePath = './test/fixtures/turbo-carto-named-maps-reds.png';
var image = mapnik.Image.fromBytes(new Buffer(res.body, 'binary')); var image = mapnik.Image.fromBytes(Buffer.from(res.body, 'binary'));
assert.imageIsSimilarToFile(image, fixturePath, IMAGE_TOLERANCE_PER_MIL, next); assert.imageIsSimilarToFile(image, fixturePath, IMAGE_TOLERANCE_PER_MIL, next);
}, },
@ -225,7 +225,7 @@ describe('turbo-carto for named maps', function () {
assert.strictEqual(res.headers['content-type'], 'image/png'); assert.strictEqual(res.headers['content-type'], 'image/png');
var fixturePath = './test/fixtures/turbo-carto-named-maps-blues.png'; var fixturePath = './test/fixtures/turbo-carto-named-maps-blues.png';
var image = mapnik.Image.fromBytes(new Buffer(res.body, 'binary')); var image = mapnik.Image.fromBytes(Buffer.from(res.body, 'binary'));
assert.imageIsSimilarToFile(image, fixturePath, IMAGE_TOLERANCE_PER_MIL, next); assert.imageIsSimilarToFile(image, fixturePath, IMAGE_TOLERANCE_PER_MIL, next);
}, },

View File

@ -167,7 +167,7 @@ describe('named_layers datasources', function () {
assert.strictEqual(layers[1].type, 'cartodb'); assert.strictEqual(layers[1].type, 'cartodb');
assert.strictEqual(layers[1].options.sql, wadusTemplateSql); assert.strictEqual(layers[1].options.sql, wadusTemplateSql);
var layerDatasource = datasource.getLayerDatasource(1); var layerDatasource = datasource.getLayerDatasource(1);
assert.notEqual(layerDatasource, undefined); assert.notStrictEqual(layerDatasource, undefined);
assert.ok(layerDatasource.user); assert.ok(layerDatasource.user);
done(); done();
@ -188,13 +188,13 @@ describe('named_layers datasources', function () {
assert.strictEqual(layers[1].type, 'mapnik'); assert.strictEqual(layers[1].type, 'mapnik');
assert.strictEqual(layers[1].options.sql, wadusMapnikSql); assert.strictEqual(layers[1].options.sql, wadusMapnikSql);
var layerDatasource = datasource.getLayerDatasource(1); var layerDatasource = datasource.getLayerDatasource(1);
assert.notEqual(layerDatasource, undefined); assert.notStrictEqual(layerDatasource, undefined);
assert.ok(layerDatasource.user); assert.ok(layerDatasource.user);
assert.strictEqual(layers[2].type, 'cartodb'); assert.strictEqual(layers[2].type, 'cartodb');
assert.strictEqual(layers[2].options.sql, wadusTemplateSql); assert.strictEqual(layers[2].options.sql, wadusTemplateSql);
layerDatasource = datasource.getLayerDatasource(2); layerDatasource = datasource.getLayerDatasource(2);
assert.notEqual(layerDatasource, undefined); assert.notStrictEqual(layerDatasource, undefined);
assert.ok(layerDatasource.user); assert.ok(layerDatasource.user);
done(); done();
@ -211,19 +211,19 @@ describe('named_layers datasources', function () {
assert.strictEqual(layers[0].type, 'mapnik'); assert.strictEqual(layers[0].type, 'mapnik');
assert.strictEqual(layers[0].options.sql, wadusMapnikSql); assert.strictEqual(layers[0].options.sql, wadusMapnikSql);
var layerDatasource = datasource.getLayerDatasource(0); var layerDatasource = datasource.getLayerDatasource(0);
assert.notEqual(layerDatasource, undefined); assert.notStrictEqual(layerDatasource, undefined);
assert.ok(layerDatasource.user); assert.ok(layerDatasource.user);
assert.strictEqual(layers[1].type, 'cartodb'); assert.strictEqual(layers[1].type, 'cartodb');
assert.strictEqual(layers[1].options.sql, wadusTemplateSql); assert.strictEqual(layers[1].options.sql, wadusTemplateSql);
layerDatasource = datasource.getLayerDatasource(1); layerDatasource = datasource.getLayerDatasource(1);
assert.notEqual(layerDatasource, undefined); assert.notStrictEqual(layerDatasource, undefined);
assert.ok(layerDatasource.user); assert.ok(layerDatasource.user);
assert.strictEqual(layers[2].type, 'cartodb'); assert.strictEqual(layers[2].type, 'cartodb');
assert.strictEqual(layers[2].options.sql, wadusTemplateSql); assert.strictEqual(layers[2].options.sql, wadusTemplateSql);
layerDatasource = datasource.getLayerDatasource(2); layerDatasource = datasource.getLayerDatasource(2);
assert.notEqual(layerDatasource, undefined); assert.notStrictEqual(layerDatasource, undefined);
assert.ok(layerDatasource.user); assert.ok(layerDatasource.user);
done(); done();
@ -247,19 +247,19 @@ describe('named_layers datasources', function () {
assert.strictEqual(layers[0].type, 'cartodb'); assert.strictEqual(layers[0].type, 'cartodb');
assert.strictEqual(layers[0].options.sql, wadusTemplateSql); assert.strictEqual(layers[0].options.sql, wadusTemplateSql);
var layerDatasource = datasource.getLayerDatasource(0); var layerDatasource = datasource.getLayerDatasource(0);
assert.notEqual(layerDatasource, undefined); assert.notStrictEqual(layerDatasource, undefined);
assert.ok(layerDatasource.user); assert.ok(layerDatasource.user);
assert.strictEqual(layers[1].type, 'mapnik'); assert.strictEqual(layers[1].type, 'mapnik');
assert.strictEqual(layers[1].options.sql, wadusMapnikSql); assert.strictEqual(layers[1].options.sql, wadusMapnikSql);
layerDatasource = datasource.getLayerDatasource(1); layerDatasource = datasource.getLayerDatasource(1);
assert.notEqual(layerDatasource, undefined); assert.notStrictEqual(layerDatasource, undefined);
assert.ok(layerDatasource.user); assert.ok(layerDatasource.user);
assert.strictEqual(layers[2].type, 'cartodb'); assert.strictEqual(layers[2].type, 'cartodb');
assert.strictEqual(layers[2].options.sql, wadusTemplateSql); assert.strictEqual(layers[2].options.sql, wadusTemplateSql);
layerDatasource = datasource.getLayerDatasource(2); layerDatasource = datasource.getLayerDatasource(2);
assert.notEqual(layerDatasource, undefined); assert.notStrictEqual(layerDatasource, undefined);
assert.ok(layerDatasource.user); assert.ok(layerDatasource.user);
assert.strictEqual(layers[3].type, 'cartodb'); assert.strictEqual(layers[3].type, 'cartodb');
@ -269,7 +269,7 @@ describe('named_layers datasources', function () {
assert.strictEqual(layers[4].type, 'cartodb'); assert.strictEqual(layers[4].type, 'cartodb');
assert.strictEqual(layers[4].options.sql, wadusTemplateSql); assert.strictEqual(layers[4].options.sql, wadusTemplateSql);
layerDatasource = datasource.getLayerDatasource(4); layerDatasource = datasource.getLayerDatasource(4);
assert.notEqual(layerDatasource, undefined); assert.notStrictEqual(layerDatasource, undefined);
assert.ok(layerDatasource.user); assert.ok(layerDatasource.user);
assert.strictEqual(layers[5].type, 'cartodb'); assert.strictEqual(layers[5].type, 'cartodb');
@ -279,13 +279,13 @@ describe('named_layers datasources', function () {
assert.strictEqual(layers[6].type, 'mapnik'); assert.strictEqual(layers[6].type, 'mapnik');
assert.strictEqual(layers[6].options.sql, wadusMapnikSql); assert.strictEqual(layers[6].options.sql, wadusMapnikSql);
layerDatasource = datasource.getLayerDatasource(6); layerDatasource = datasource.getLayerDatasource(6);
assert.notEqual(layerDatasource, undefined); assert.notStrictEqual(layerDatasource, undefined);
assert.ok(layerDatasource.user); assert.ok(layerDatasource.user);
assert.strictEqual(layers[7].type, 'cartodb'); assert.strictEqual(layers[7].type, 'cartodb');
assert.strictEqual(layers[7].options.sql, wadusTemplateSql); assert.strictEqual(layers[7].options.sql, wadusTemplateSql);
layerDatasource = datasource.getLayerDatasource(7); layerDatasource = datasource.getLayerDatasource(7);
assert.notEqual(layerDatasource, undefined); assert.notStrictEqual(layerDatasource, undefined);
assert.ok(layerDatasource.user); assert.ok(layerDatasource.user);
done(); done();

View File

@ -235,7 +235,7 @@ describe('mapconfig-named-layers-adapter', function () {
var layers = mapConfig.layers; var layers = mapConfig.layers;
assert.ok(layers.length, 1); assert.ok(layers.length, 1);
assert.ok(layers[0].type, 'cartodb'); assert.ok(layers[0].type, 'cartodb');
assert.notEqual(context.datasource.getLayerDatasource(0), undefined); assert.notStrictEqual(context.datasource.getLayerDatasource(0), undefined);
done(); done();
} }
@ -257,7 +257,7 @@ describe('mapconfig-named-layers-adapter', function () {
assert.ok(!err); assert.ok(!err);
var layers = mapConfig.layers; var layers = mapConfig.layers;
assert.strictEqual(layers.length, 1); assert.strictEqual(layers.length, 1);
assert.notEqual(context.datasource.getLayerDatasource(0), undefined); assert.notStrictEqual(context.datasource.getLayerDatasource(0), undefined);
templateMaps.delTemplate(username, tokenAuthTemplateName, done); templateMaps.delTemplate(username, tokenAuthTemplateName, done);
} }
@ -283,11 +283,11 @@ describe('mapconfig-named-layers-adapter', function () {
assert.strictEqual(layers[0].type, 'mapnik'); assert.strictEqual(layers[0].type, 'mapnik');
assert.strictEqual(layers[0].options.cartocss, '#layer { polygon-fill: green; }'); assert.strictEqual(layers[0].options.cartocss, '#layer { polygon-fill: green; }');
assert.notEqual(context.datasource.getLayerDatasource(0), undefined); assert.notStrictEqual(context.datasource.getLayerDatasource(0), undefined);
assert.strictEqual(layers[1].type, 'cartodb'); assert.strictEqual(layers[1].type, 'cartodb');
assert.strictEqual(layers[1].options.cartocss, '#layer { marker-fill: red; }'); assert.strictEqual(layers[1].options.cartocss, '#layer { marker-fill: red; }');
assert.notEqual(context.datasource.getLayerDatasource(1), undefined); assert.notStrictEqual(context.datasource.getLayerDatasource(1), undefined);
templateMaps.delTemplate(username, multipleLayersTemplateName, done); templateMaps.delTemplate(username, multipleLayersTemplateName, done);
} }
@ -320,11 +320,11 @@ describe('mapconfig-named-layers-adapter', function () {
assert.strictEqual(layers[0].type, 'mapnik'); assert.strictEqual(layers[0].type, 'mapnik');
assert.strictEqual(layers[0].options.cartocss, '#layer { polygon-fill: ' + polygonColor + '; }'); assert.strictEqual(layers[0].options.cartocss, '#layer { polygon-fill: ' + polygonColor + '; }');
assert.notEqual(context.datasource.getLayerDatasource(0), undefined); assert.notStrictEqual(context.datasource.getLayerDatasource(0), undefined);
assert.strictEqual(layers[1].type, 'cartodb'); assert.strictEqual(layers[1].type, 'cartodb');
assert.strictEqual(layers[1].options.cartocss, '#layer { marker-fill: ' + color + '; }'); assert.strictEqual(layers[1].options.cartocss, '#layer { marker-fill: ' + color + '; }');
assert.notEqual(context.datasource.getLayerDatasource(1), undefined); assert.notStrictEqual(context.datasource.getLayerDatasource(1), undefined);
templateMaps.delTemplate(username, multipleLayersTemplateName, done); templateMaps.delTemplate(username, multipleLayersTemplateName, done);
} }

View File

@ -33,8 +33,8 @@ assert.imageBufferIsSimilarToFile = function (buffer, referenceImageRelativeFile
}; };
assert.imageBuffersAreSimilar = function (bufferA, bufferB, tolerance, callback) { assert.imageBuffersAreSimilar = function (bufferA, bufferB, tolerance, callback) {
var testImage = mapnik.Image.fromBytes(Buffer.isBuffer(bufferA) ? bufferA : new Buffer(bufferA, 'binary')); var testImage = mapnik.Image.fromBytes(Buffer.isBuffer(bufferA) ? bufferA : Buffer.from(bufferA, 'binary'));
var referenceImage = mapnik.Image.fromBytes(Buffer.isBuffer(bufferB) ? bufferB : new Buffer(bufferB, 'binary')); var referenceImage = mapnik.Image.fromBytes(Buffer.isBuffer(bufferB) ? bufferB : Buffer.from(bufferB, 'binary'));
imagesAreSimilar(testImage, referenceImage, tolerance, callback); imagesAreSimilar(testImage, referenceImage, tolerance, callback);
}; };

View File

@ -924,11 +924,11 @@ TestClient.prototype.getTile = function (z, x, y, params, callback) {
var body; var body;
switch (res.headers['content-type']) { switch (res.headers['content-type']) {
case 'image/png': case 'image/png':
body = mapnik.Image.fromBytes(new Buffer(res.body, 'binary')); body = mapnik.Image.fromBytes(Buffer.from(res.body, 'binary'));
break; break;
case 'application/x-protobuf': case 'application/x-protobuf':
body = new mapnik.VectorTile(z, x, y); body = new mapnik.VectorTile(z, x, y);
body.setDataSync(new Buffer(res.body, 'binary')); body.setDataSync(Buffer.from(res.body, 'binary'));
break; break;
case 'application/json; charset=utf-8': case 'application/json; charset=utf-8':
body = JSON.parse(res.body); body = JSON.parse(res.body);
@ -1098,7 +1098,7 @@ TestClient.prototype.getStaticCenter = function (params, callback) {
var body; var body;
switch (res.headers['content-type']) { switch (res.headers['content-type']) {
case 'image/png': case 'image/png':
body = mapnik.Image.fromBytes(new Buffer(res.body, 'binary')); body = mapnik.Image.fromBytes(Buffer.from(res.body, 'binary'));
break; break;
case 'application/json; charset=utf-8': case 'application/json; charset=utf-8':
body = JSON.parse(res.body); body = JSON.parse(res.body);
@ -1335,7 +1335,7 @@ module.exports.getStaticMap = function getStaticMap (templateName, params, callb
assert.response(server, requestOptions, expectedResponse, function (res, err) { assert.response(server, requestOptions, expectedResponse, function (res, err) {
helper.deleteRedisKeys({ 'user:localhost:mapviews:global': 5 }, function () { helper.deleteRedisKeys({ 'user:localhost:mapviews:global': 5 }, function () {
return callback(err, mapnik.Image.fromBytes(new Buffer(res.body, 'binary'))); return callback(err, mapnik.Image.fromBytes(Buffer.from(res.body, 'binary')));
}); });
}); });
}; };
@ -1537,11 +1537,11 @@ TestClient.prototype.getNamedTile = function (name, z, x, y, format, options, ca
let body; let body;
switch (res.headers['content-type']) { switch (res.headers['content-type']) {
case 'image/png': case 'image/png':
body = mapnik.Image.fromBytes(new Buffer(res.body, 'binary')); body = mapnik.Image.fromBytes(Buffer.from(res.body, 'binary'));
break; break;
case 'application/x-protobuf': case 'application/x-protobuf':
body = new mapnik.VectorTile(z, x, y); body = new mapnik.VectorTile(z, x, y);
body.setDataSync(new Buffer(res.body, 'binary')); body.setDataSync(Buffer.from(res.body, 'binary'));
break; break;
case 'application/json; charset=utf-8': case 'application/json; charset=utf-8':
body = JSON.parse(res.body); body = JSON.parse(res.body);

View File

@ -33,7 +33,7 @@ function lzma_compress_to_base64 (payload, mode, callback) {
lzmaWorker.compress(payload, mode, lzmaWorker.compress(payload, mode,
function (ints) { function (ints) {
ints = ints.map(function (c) { return String.fromCharCode(c + 128); }).join(''); ints = ints.map(function (c) { return String.fromCharCode(c + 128); }).join('');
var base64 = new Buffer(ints, 'binary').toString('base64'); var base64 = Buffer.from(ints, 'binary').toString('base64');
callback(null, base64); callback(null, base64);
}, },
function (/* percent */) { function (/* percent */) {

View File

@ -13,6 +13,6 @@ describe('profiler', function () {
it('Profiler is NOT null in ProfilerProxy when profiling is enabled', function () { it('Profiler is NOT null in ProfilerProxy when profiling is enabled', function () {
var profilerProxy = new ProfilerProxy({ profile: true }); var profilerProxy = new ProfilerProxy({ profile: true });
assert.notEqual(profilerProxy.profiler, null); assert.notStrictEqual(profilerProxy.profiler, null);
}); });
}); });