Skip to content

LighthouseAssertion

Defined in: index.ts:6

Lighthouse CI assertions for the audits this package knows about, plus any other audit by id. Each is a [level, options] pair, where the level is off, warn or error.

[key: string]: MinScoreAssertion | MaxLengthAssertion | undefined

optional bf-cache?: MinScoreAssertion

Defined in: index.ts:8

Assertion for the back/forward cache audit; fails below minScore.


optional errors-in-console?: MinScoreAssertion

Defined in: index.ts:10

Assertion for the audit of errors logged to the browser console; fails below minScore.


optional font-display?: MinScoreAssertion

Defined in: index.ts:12

Assertion for the font-display audit; fails below minScore.


optional label?: MinScoreAssertion

Defined in: index.ts:14

Assertion for the audit that checks form elements have labels; fails below minScore.


optional largest-contentful-paint?: MinScoreAssertion

Defined in: index.ts:16

Assertion for the Largest Contentful Paint audit; fails below minScore.


optional lcp-lazy-loaded?: MinScoreAssertion

Defined in: index.ts:18

Assertion for the audit that flags a lazy-loaded Largest Contentful Paint image; fails below minScore.


optional non-composited-animations?: MinScoreAssertion

Defined in: index.ts:20

Assertion for the audit that flags animations that cannot run on the compositor; fails below minScore.


optional prioritize-lcp-image?: MinScoreAssertion

Defined in: index.ts:22

Assertion for the audit that checks the Largest Contentful Paint image is prioritised; fails below minScore.


optional unused-javascript?: MaxLengthAssertion

Defined in: index.ts:24

Assertion for the unused JavaScript audit; maxLength caps how many items it may report.


optional uses-long-cache-ttl?: MaxLengthAssertion

Defined in: index.ts:26

Assertion for the cache lifetime audit; maxLength caps how many items it may report.