diff --git a/lighthouse-cli/test/smokehouse/test-definitions/dobetterweb/dbw-expectations.js b/lighthouse-cli/test/smokehouse/test-definitions/dobetterweb/dbw-expectations.js index b1f889685124..bc80333978f8 100644 --- a/lighthouse-cli/test/smokehouse/test-definitions/dobetterweb/dbw-expectations.js +++ b/lighthouse-cli/test/smokehouse/test-definitions/dobetterweb/dbw-expectations.js @@ -20,6 +20,7 @@ const expectations = { length: 28, }, artifacts: { + BenchmarkIndex: '<10000', HostFormFactor: 'desktop', Stacks: [{ id: 'jquery', diff --git a/lighthouse-core/lib/page-functions.js b/lighthouse-core/lib/page-functions.js index 3653d7c33b74..94b5937f2966 100644 --- a/lighthouse-core/lib/page-functions.js +++ b/lighthouse-core/lib/page-functions.js @@ -208,7 +208,8 @@ function computeBenchmarkIndex() { while (Date.now() - start < 500) { let s = ''; - for (let j = 0; j < 10000; j++) s += 'a'; // eslint-disable-line no-unused-vars + for (let j = 0; j < 10000; j++) s += 'a'; + if (s.length === 1) throw new Error('will never happen, but prevents compiler optimizations'); iterations++; }