Skip to content

Commit

Permalink
tests(smoke): convert core tests to single-expectations format (#12819)
Browse files Browse the repository at this point in the history
  • Loading branch information
brendankenny authored Jul 23, 2021
1 parent ccb8478 commit 43b11e0
Show file tree
Hide file tree
Showing 25 changed files with 3,982 additions and 3,619 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/smoke.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
runs-on: ubuntu-latest
env:
# The smokehouse tests run by job `test set 1`. `test set 2` will run the rest.
SMOKE_BATCH_1: a11y oopif pwa pwa2 pwa3 dbw redirects errors offline
SMOKE_BATCH_1: a11y oopif pwa dbw redirects errors offline
# Job named e.g. "Chrome stable, test set 1".
name: Chrome ${{ matrix.chrome-channel }}, batch ${{ matrix.smoke-test-invert == false && '1' || '2' }}

Expand Down
4 changes: 1 addition & 3 deletions lighthouse-cli/test/smokehouse/frontends/lib.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,14 @@
const cloneDeep = require('lodash.clonedeep');
const smokeTests = require('../test-definitions/core-tests.js');
const {runSmokehouse} = require('../smokehouse.js');
const {updateTestDefnFormat} = require('./back-compat-util.js');

/**
* @param {Smokehouse.SmokehouseLibOptions} options
*/
async function smokehouse(options) {
const {urlFilterRegex, skip, modify, ...smokehouseOptions} = options;

const updatedCoreTests = updateTestDefnFormat(smokeTests);
const clonedTests = cloneDeep(updatedCoreTests);
const clonedTests = cloneDeep(smokeTests);
const modifiedTests = [];
for (const test of clonedTests) {
if (urlFilterRegex && !test.expectations.lhr.requestedUrl.match(urlFilterRegex)) {
Expand Down
2 changes: 1 addition & 1 deletion lighthouse-cli/test/smokehouse/smokehouse.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ async function runSmokehouse(smokeTestDefns, smokehouseOptions) {
const failingDefns = testResults.filter(result => result.failed);
if (failingDefns.length) {
const testNames = failingDefns.map(d => d.id).join(', ');
console.error(log.redify(`We have ${failingDefns.length} failing smoketest(s): ${testNames}`));
console.log(log.redify(`We have ${failingDefns.length} failing smoketest(s): ${testNames}`));
return {success: false, testResults};
}

Expand Down
Loading

0 comments on commit 43b11e0

Please sign in to comment.