Skip to content

Commit

Permalink
add test for traceviewer's require not throwing.
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed Aug 1, 2016
1 parent 7202494 commit 7293f6e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lighthouse-core/test/lib/traces/tracing-processor.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/
'use strict';

const TracingProcessor = require('../../../lib/traces/tracing-processor');
let TracingProcessor;
const assert = require('assert');

/* eslint-env mocha */
Expand All @@ -39,6 +39,12 @@ function createRiskPercentiles(percentiles, times) {
}

describe('TracingProcessor lib', () => {
it('doesn\'t throw when module is loaded', () => {
assert.doesNotThrow(_ => {
TracingProcessor = require('../../../lib/traces/tracing-processor');
});
});

describe('riskPercentiles calculation', () => {
it('correctly calculates percentiles of no tasks', () => {
const results = TracingProcessor._riskPercentiles([], 100, defaultPercentiles);
Expand Down

0 comments on commit 7293f6e

Please sign in to comment.