Skip to content

Commit

Permalink
move files. update snapshots
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirish committed Dec 17, 2020
1 parent 2a7a192 commit 00e3b28
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/cron-weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ jobs:
node-version: 12.x
- run: yarn --frozen-lockfile

- run: yarn jest --testMatch="**/.github/test/**/*-test.js"
- run: yarn jest --testMatch="**/third-party/chromium-synchronization/*-test.js"
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ module.exports = {
'**/lighthouse-treemap/**/*-test-pptr.js',
'**/lighthouse-viewer/**/*-test.js',
'**/lighthouse-viewer/**/*-test-pptr.js',
'**/third-party/**/*-test.js',
'**/clients/test/**/*-test.js',
'**/docs/**/*.test.js',
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,27 @@ describe('issueAdded types', () => {
it('should notify us if something changed', () => {
expect(inspectorIssueDetailsTypes).toMatchInlineSnapshot(`
Array [
"sameSiteCookieIssueDetails",
"mixedContentIssueDetails",
"blockedByResponseIssueDetails",
"heavyAdIssueDetails",
"contentSecurityPolicyIssueDetails",
"heavyAdIssueDetails",
"mixedContentIssueDetails",
"sameSiteCookieIssueDetails",
"sharedArrayBufferTransferIssueDetails",
]
`);
});

it('are each handled explicitly in the gatherer', () => {
// Regex relies on the typecasts
const sourceTypeMatches = inspectorIssuesGathererSource.matchAll(/LH\.Crdp\.Audits\.(.*?Details)>/g);
const sourceTypeMatches = inspectorIssuesGathererSource.matchAll(
/LH\.Crdp\.Audits\.(.*?Details)>/g
);

const sourceTypeMatchIds = [...sourceTypeMatches]
.map(match => match[1])
// mapping TS type casing (TitleCase) to protocol types (camelCase)
.map(id => `${id.slice(0, 1).toLowerCase()}${id.slice(1)}`)
.sort();
.map(match => match[1])
// mapping TS type casing (TitleCase) to protocol types (camelCase)
.map(id => `${id.slice(0, 1).toLowerCase()}${id.slice(1)}`)
.sort();

expect(sourceTypeMatchIds).toMatchObject(inspectorIssueDetailsTypes);
});
Expand Down
1 change: 0 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"exclude": [
"lighthouse-core/lib/cdt",
"lighthouse-core/test/**/*.js",
".github/test/*.js",
"clients/test/**/*.js",
"lighthouse-cli/test/fixtures/**/*.js",
"lighthouse-core/scripts/legacy-javascript/variants",
Expand Down

0 comments on commit 00e3b28

Please sign in to comment.