@@ -23,6 +23,8 @@ const baseLhr800_ = require('../fixtures/lh-8-0-0-coursehero-a.json');
2323const baselhr930_ = require ( '../fixtures/lh-9-3-0-coursehero-a.json' ) ;
2424/** @type {any } */
2525const baselhr1010_ = require ( '../fixtures/lh-10-1-0-coursehero-a.json' ) ;
26+ /** @type {any } */
27+ const baselhr1140_ = require ( '../fixtures/lh-11-4-0-coursehero-a.json' ) ;
2628const { definitions} = require ( '../../src/api/statistic-definitions.js' ) ;
2729
2830describe ( 'Statistic Definitions' , ( ) => {
@@ -42,6 +44,8 @@ describe('Statistic Definitions', () => {
4244 const baselhr930 = baselhr930_ ;
4345 /** @type {LH.Result } */
4446 const baselhr1010 = baselhr1010_ ;
47+ /** @type {LH.Result } */
48+ const baselhr1140 = baselhr1140_ ;
4549
4650 describe ( 'meta_lighthouse_version()' , ( ) => {
4751 const run = definitions . meta_lighthouse_version ;
@@ -55,6 +59,7 @@ describe('Statistic Definitions', () => {
5559 expect ( run ( [ baseLhr800 ] ) ) . toEqual ( { value : 80000 } ) ;
5660 expect ( run ( [ baselhr930 ] ) ) . toEqual ( { value : 90300 } ) ;
5761 expect ( run ( [ baselhr1010 ] ) ) . toEqual ( { value : 100100 } ) ;
62+ expect ( run ( [ baselhr1140 ] ) ) . toEqual ( { value : 110400 } ) ;
5863 expect ( run ( [ { ...baseLhr5 , lighthouseVersion : '1.2.3-beta.0' } ] ) ) . toEqual ( { value : 10203 } ) ;
5964 } ) ;
6065
@@ -80,6 +85,7 @@ describe('Statistic Definitions', () => {
8085 expect ( run ( [ high , baseLhr800 , low ] ) . value ) . toBeCloseTo ( 20822.103 ) ;
8186 expect ( run ( [ high , baselhr930 , low ] ) . value ) . toBeCloseTo ( 20525.578 ) ;
8287 expect ( run ( [ high , baselhr1010 , low ] ) . value ) . toBeCloseTo ( 21627.392 ) ;
88+ expect ( run ( [ high , baselhr1140 , low ] ) . value ) . toBeCloseTo ( 80796.283 ) ;
8389 } ) ;
8490 } ) ;
8591
@@ -99,6 +105,7 @@ describe('Statistic Definitions', () => {
99105 expect ( run ( [ high , baseLhr800 , low ] ) . value ) . toBeCloseTo ( 0.24 ) ;
100106 expect ( run ( [ high , baselhr930 , low ] ) . value ) . toBeCloseTo ( 0.23 ) ;
101107 expect ( run ( [ high , baselhr1010 , low ] ) . value ) . toBeCloseTo ( 0.21 ) ;
108+ expect ( run ( [ high , baselhr1140 , low ] ) . value ) . toBeCloseTo ( 0.32 ) ;
102109 } ) ;
103110 } ) ;
104111
@@ -118,6 +125,7 @@ describe('Statistic Definitions', () => {
118125 expect ( run ( [ high , baseLhr800 , low ] ) . value ) . toBeCloseTo ( 0.01 ) ;
119126 expect ( run ( [ high , baselhr930 , low ] ) . value ) . toBeCloseTo ( 0.01 ) ;
120127 expect ( run ( [ high , baselhr1010 , low ] ) . value ) . toBeCloseTo ( 0.01 ) ;
128+ expect ( run ( [ high , baselhr1140 , low ] ) . value ) . toBeCloseTo ( 0.01 ) ;
121129 } ) ;
122130 } ) ;
123131
@@ -137,6 +145,7 @@ describe('Statistic Definitions', () => {
137145 expect ( run ( [ high , baseLhr800 , low ] ) . value ) . toBeCloseTo ( 0.99 ) ;
138146 expect ( run ( [ high , baselhr930 , low ] ) . value ) . toBeCloseTo ( 0.99 ) ;
139147 expect ( run ( [ high , baselhr1010 , low ] ) . value ) . toBeCloseTo ( 0.99 ) ;
148+ expect ( run ( [ high , baselhr1140 , low ] ) . value ) . toBeCloseTo ( 0.99 ) ;
140149 } ) ;
141150 } ) ;
142151
@@ -150,6 +159,7 @@ describe('Statistic Definitions', () => {
150159 expect ( definitions [ 'auditgroup_a11y-aria_pass' ] ( [ baseLhr800 ] ) ) . toEqual ( { value : 6 } ) ;
151160 expect ( definitions [ 'auditgroup_a11y-aria_pass' ] ( [ baselhr930 ] ) ) . toEqual ( { value : 8 } ) ;
152161 expect ( definitions [ 'auditgroup_a11y-aria_pass' ] ( [ baselhr1010 ] ) ) . toEqual ( { value : 8 } ) ;
162+ expect ( definitions [ 'auditgroup_a11y-aria_pass' ] ( [ baselhr1140 ] ) ) . toEqual ( { value : 9 } ) ;
153163 expect ( definitions [ 'auditgroup_a11y-color-contrast_fail' ] ( [ baseLhr5 ] ) ) . toEqual ( { value : 0 } ) ;
154164 expect ( definitions [ 'auditgroup_a11y-color-contrast_fail' ] ( [ baseLhr6 ] ) ) . toEqual ( { value : 1 } ) ;
155165 expect ( definitions [ 'auditgroup_a11y-color-contrast_fail' ] ( [ baseLhr62 ] ) ) . toEqual ( { value : 1 } ) ;
@@ -158,6 +168,7 @@ describe('Statistic Definitions', () => {
158168 expect ( definitions [ 'auditgroup_a11y-color-contrast_fail' ] ( [ baseLhr800 ] ) ) . toEqual ( { value : 1 } ) ;
159169 expect ( definitions [ 'auditgroup_a11y-color-contrast_fail' ] ( [ baselhr930 ] ) ) . toEqual ( { value : 1 } ) ;
160170 expect ( definitions [ 'auditgroup_a11y-color-contrast_fail' ] ( [ baselhr1010 ] ) ) . toEqual ( { value : 1 } ) ;
171+ expect ( definitions [ 'auditgroup_a11y-color-contrast_fail' ] ( [ baselhr1140 ] ) ) . toEqual ( { value : 1 } ) ;
161172 expect ( definitions [ 'auditgroup_a11y-aria_na' ] ( [ baseLhr5 ] ) ) . toEqual ( { value : 0 } ) ;
162173 expect ( definitions [ 'auditgroup_a11y-aria_na' ] ( [ baseLhr6 ] ) ) . toEqual ( { value : 2 } ) ;
163174 expect ( definitions [ 'auditgroup_a11y-aria_na' ] ( [ baseLhr62 ] ) ) . toEqual ( { value : 2 } ) ;
@@ -166,6 +177,7 @@ describe('Statistic Definitions', () => {
166177 expect ( definitions [ 'auditgroup_a11y-aria_na' ] ( [ baseLhr800 ] ) ) . toEqual ( { value : 11 } ) ;
167178 expect ( definitions [ 'auditgroup_a11y-aria_na' ] ( [ baselhr930 ] ) ) . toEqual ( { value : 9 } ) ;
168179 expect ( definitions [ 'auditgroup_a11y-aria_na' ] ( [ baselhr1010 ] ) ) . toEqual ( { value : 9 } ) ;
180+ expect ( definitions [ 'auditgroup_a11y-aria_na' ] ( [ baselhr1140 ] ) ) . toEqual ( { value : 9 } ) ;
169181 } ) ;
170182 } ) ;
171183} ) ;
0 commit comments