Windshaft-cartodb/test/unit/ported/profiler-test.js

20 lines
619 B
JavaScript
Raw Normal View History

'use strict';
2019-10-07 17:29:07 +08:00
require('../../support/test-helper');
2015-09-15 01:07:53 +08:00
var assert = require('assert');
2019-10-07 17:29:07 +08:00
var ProfilerProxy = require('../../../lib/stats/profiler-proxy');
2015-09-15 01:07:53 +08:00
describe('profiler', function() {
it('Profiler is null in ProfilerProxy when profiling is not enabled', function() {
var profilerProxy = new ProfilerProxy({profile: false});
assert.equal(profilerProxy.profiler, null);
});
it('Profiler is NOT null in ProfilerProxy when profiling is enabled', function() {
var profilerProxy = new ProfilerProxy({profile: true});
assert.notEqual(profilerProxy.profiler, null);
});
});