Skip to content

Commit 7293f6e

Browse files
committed
add test for traceviewer's require not throwing.
1 parent 7202494 commit 7293f6e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lighthouse-core/test/lib/traces/tracing-processor.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616
'use strict';
1717

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

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

4141
describe('TracingProcessor lib', () => {
42+
it('doesn\'t throw when module is loaded', () => {
43+
assert.doesNotThrow(_ => {
44+
TracingProcessor = require('../../../lib/traces/tracing-processor');
45+
});
46+
});
47+
4248
describe('riskPercentiles calculation', () => {
4349
it('correctly calculates percentiles of no tasks', () => {
4450
const results = TracingProcessor._riskPercentiles([], 100, defaultPercentiles);

0 commit comments

Comments
 (0)