From 7293f6e6934f0082d08c8f090e715c7d2b87274c Mon Sep 17 00:00:00 2001 From: Paul Irish Date: Mon, 1 Aug 2016 12:31:18 -0700 Subject: [PATCH] add test for traceviewer's require not throwing. --- lighthouse-core/test/lib/traces/tracing-processor.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lighthouse-core/test/lib/traces/tracing-processor.js b/lighthouse-core/test/lib/traces/tracing-processor.js index 046d096c897a..b4bc2ad6ea93 100644 --- a/lighthouse-core/test/lib/traces/tracing-processor.js +++ b/lighthouse-core/test/lib/traces/tracing-processor.js @@ -15,7 +15,7 @@ */ 'use strict'; -const TracingProcessor = require('../../../lib/traces/tracing-processor'); +let TracingProcessor; const assert = require('assert'); /* eslint-env mocha */ @@ -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);