Skip to content

Commit

Permalink
tests: make yarn unit run all available unit tests (#13148)
Browse files Browse the repository at this point in the history
  • Loading branch information
brendankenny authored Sep 30, 2021
1 parent e6921d9 commit b132cf7
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 11 deletions.
File renamed without changes.
2 changes: 0 additions & 2 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ module.exports = {
'**/report/**/*-test.js',
'**/lighthouse-core/test/fraggle-rock/**/*-test-pptr.js',
'**/lighthouse-treemap/**/*-test.js',
'**/lighthouse-treemap/**/*-test-pptr.js',
'**/lighthouse-viewer/**/*-test.js',
'**/lighthouse-viewer/**/*-test-pptr.js',
'**/third-party/**/*-test.js',
'**/clients/test/**/*-test.js',
],
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
"jest": "node --experimental-vm-modules ./node_modules/jest/bin/jest.js",
"test": "yarn diff:sample-json && yarn lint --quiet && yarn unit && yarn type-check",
"test-bundle": "yarn smoke --runner bundle -j=1 --retries=2 --invert-match forms",
"test-clients": "yarn jest \"$PWD/clients/\"",
"test-viewer": "yarn unit-viewer && yarn jest lighthouse-viewer/test/viewer-test-pptr.js",
"test-treemap": "yarn unit-treemap && yarn jest lighthouse-treemap/test/treemap-test-pptr.js",
"test-clients": "yarn jest \"$PWD/clients/\" && yarn jest --testMatch=\"**/clients/test/**/*-test-pptr.js\"",
"test-viewer": "yarn unit-viewer && yarn jest --testMatch=\"**/lighthouse-viewer/**/*-test-pptr.js\"",
"test-treemap": "yarn unit-treemap && yarn jest --testMatch=\"**/lighthouse-treemap/**/*-test-pptr.js\"",
"test-lantern": "bash lighthouse-core/scripts/test-lantern.sh",
"test-legacy-javascript": "bash lighthouse-core/scripts/test-legacy-javascript.sh",
"test-docs": "yarn --cwd docs/recipes/ test",
Expand All @@ -50,8 +50,8 @@
"unit-treemap": "yarn jest \"lighthouse-treemap/.*-test.js\"",
"unit-viewer": "yarn jest \"lighthouse-viewer/.*-test.js\"",
"unit-flow": "yarn jest \"flow-report/.*-test.[tj]s[x]?\"",
"unit": "yarn unit-core && yarn unit-cli && yarn unit-report && yarn unit-viewer && yarn unit-treemap && yarn unit-flow",
"unit:ci": "NODE_OPTIONS=--max-old-space-size=8192 npm run unit-core -- --ci && npm run unit-cli -- --ci && npm run unit-report -- --ci && npm run unit-viewer -- --ci && npm run unit-treemap -- --ci && npm run unit-flow -- --ci",
"unit": "yarn jest",
"unit:ci": "NODE_OPTIONS=--max-old-space-size=8192 npm run jest -- --ci",
"core-unit": "yarn unit-core",
"cli-unit": "yarn unit-cli",
"viewer-unit": "yarn unit-viewer",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

const fs = require('fs');
const fetch = require('node-fetch');
const {LH_ROOT} = require('../../../root.js');
const {LH_ROOT} = require('../../root.js');

const inspectorIssuesGathererPath = LH_ROOT +
'/lighthouse-core/gather/gatherers/inspector-issues.js';
Expand All @@ -31,7 +31,8 @@ describe('issueAdded types', () => {
.sort();
});

it('should notify us if something changed', () => {
// TODO: https://github.com/GoogleChrome/lighthouse/issues/13147
it.skip('should notify us if something changed', () => {
expect(inspectorIssueDetailsTypes).toMatchInlineSnapshot(`
Array [
"blockedByResponseIssueDetails",
Expand All @@ -44,7 +45,8 @@ describe('issueAdded types', () => {
`);
});

it('are each handled explicitly in the gatherer', () => {
// TODO: https://github.com/GoogleChrome/lighthouse/issues/13147
it.skip('are each handled explicitly in the gatherer', () => {
// Regex relies on the typecasts
const sourceTypeMatches = inspectorIssuesGathererSource.matchAll(
/LH\.Crdp\.Audits\.(.*?Details)>/g
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ Array [
`);
});

it('are each handled explicitly in the gatherer', () => {
// TODO: https://github.com/GoogleChrome/lighthouse/issues/13147
it.skip('are each handled explicitly in the gatherer', () => {
const errorStrings = Object.keys(InstallableManifestAudit.UIStrings)
.filter(key => chromiumErrorIds.includes(key))
.sort();
Expand Down

0 comments on commit b132cf7

Please sign in to comment.