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

19 lines
637 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
2019-10-22 01:07:24 +08:00
describe('profiler', function () {
it('Profiler is null in ProfilerProxy when profiling is not enabled', function () {
var profilerProxy = new ProfilerProxy({ profile: false });
assert.strictEqual(profilerProxy.profiler, null);
2015-09-15 01:07:53 +08:00
});
2019-10-22 01:07:24 +08:00
it('Profiler is NOT null in ProfilerProxy when profiling is enabled', function () {
var profilerProxy = new ProfilerProxy({ profile: true });
assert.notStrictEqual(profilerProxy.profiler, null);
2015-09-15 01:07:53 +08:00
});
});