@@ -27,6 +27,8 @@ const baselhr1010_ = require('../fixtures/lh-10-1-0-coursehero-a.json');
2727const baselhr1140_ = require ( '../fixtures/lh-11-4-0-coursehero-a.json' ) ;
2828/** @type {any } */
2929const baselhr1200_ = require ( '../fixtures/lh-12-0-0-coursehero-a.json' ) ;
30+ /** @type {any } */
31+ const baselhr1261_ = require ( '../fixtures/lh-12-6-1-coursehero-a.json' ) ;
3032const { definitions} = require ( '../../src/api/statistic-definitions.js' ) ;
3133
3234describe ( 'Statistic Definitions' , ( ) => {
@@ -50,6 +52,8 @@ describe('Statistic Definitions', () => {
5052 const baselhr1140 = baselhr1140_ ;
5153 /** @type {LH.Result } */
5254 const baselhr1200 = baselhr1200_ ;
55+ /** @type {LH.Result } */
56+ const baselhr1261 = baselhr1261_ ;
5357
5458 describe ( 'meta_lighthouse_version()' , ( ) => {
5559 const run = definitions . meta_lighthouse_version ;
@@ -65,6 +69,7 @@ describe('Statistic Definitions', () => {
6569 expect ( run ( [ baselhr1010 ] ) ) . toEqual ( { value : 100100 } ) ;
6670 expect ( run ( [ baselhr1140 ] ) ) . toEqual ( { value : 110400 } ) ;
6771 expect ( run ( [ baselhr1200 ] ) ) . toEqual ( { value : 120000 } ) ;
72+ expect ( run ( [ baselhr1261 ] ) ) . toEqual ( { value : 120601 } ) ;
6873 expect ( run ( [ { ...baseLhr5 , lighthouseVersion : '1.2.3-beta.0' } ] ) ) . toEqual ( { value : 10203 } ) ;
6974 } ) ;
7075
@@ -92,6 +97,7 @@ describe('Statistic Definitions', () => {
9297 expect ( run ( [ high , baselhr1010 , low ] ) . value ) . toBeCloseTo ( 21627.392 ) ;
9398 expect ( run ( [ high , baselhr1140 , low ] ) . value ) . toBeCloseTo ( 80796.283 ) ;
9499 expect ( run ( [ high , baselhr1200 , low ] ) . value ) . toBeCloseTo ( 82970.673 ) ;
100+ expect ( run ( [ high , baselhr1261 , low ] ) . value ) . toBeCloseTo ( 84118.687 ) ;
95101 } ) ;
96102 } ) ;
97103
@@ -113,6 +119,7 @@ describe('Statistic Definitions', () => {
113119 expect ( run ( [ high , baselhr1010 , low ] ) . value ) . toBeCloseTo ( 0.21 ) ;
114120 expect ( run ( [ high , baselhr1140 , low ] ) . value ) . toBeCloseTo ( 0.32 ) ;
115121 expect ( run ( [ high , baselhr1200 , low ] ) . value ) . toBeCloseTo ( 0.34 ) ;
122+ expect ( run ( [ high , baselhr1261 , low ] ) . value ) . toBeCloseTo ( 0.27 ) ;
116123 } ) ;
117124 } ) ;
118125
@@ -134,6 +141,7 @@ describe('Statistic Definitions', () => {
134141 expect ( run ( [ high , baselhr1010 , low ] ) . value ) . toBeCloseTo ( 0.01 ) ;
135142 expect ( run ( [ high , baselhr1140 , low ] ) . value ) . toBeCloseTo ( 0.01 ) ;
136143 expect ( run ( [ high , baselhr1200 , low ] ) . value ) . toBeCloseTo ( 0.01 ) ;
144+ expect ( run ( [ high , baselhr1261 , low ] ) . value ) . toBeCloseTo ( 0.01 ) ;
137145 } ) ;
138146 } ) ;
139147
@@ -155,6 +163,7 @@ describe('Statistic Definitions', () => {
155163 expect ( run ( [ high , baselhr1010 , low ] ) . value ) . toBeCloseTo ( 0.99 ) ;
156164 expect ( run ( [ high , baselhr1140 , low ] ) . value ) . toBeCloseTo ( 0.99 ) ;
157165 expect ( run ( [ high , baselhr1200 , low ] ) . value ) . toBeCloseTo ( 0.99 ) ;
166+ expect ( run ( [ high , baselhr1261 , low ] ) . value ) . toBeCloseTo ( 0.99 ) ;
158167 } ) ;
159168 } ) ;
160169
@@ -170,6 +179,7 @@ describe('Statistic Definitions', () => {
170179 expect ( definitions [ 'auditgroup_a11y-aria_pass' ] ( [ baselhr1010 ] ) ) . toEqual ( { value : 8 } ) ;
171180 expect ( definitions [ 'auditgroup_a11y-aria_pass' ] ( [ baselhr1140 ] ) ) . toEqual ( { value : 9 } ) ;
172181 expect ( definitions [ 'auditgroup_a11y-aria_pass' ] ( [ baselhr1200 ] ) ) . toEqual ( { value : 12 } ) ;
182+ expect ( definitions [ 'auditgroup_a11y-aria_pass' ] ( [ baselhr1261 ] ) ) . toEqual ( { value : 12 } ) ;
173183 expect ( definitions [ 'auditgroup_a11y-color-contrast_fail' ] ( [ baseLhr5 ] ) ) . toEqual ( { value : 0 } ) ;
174184 expect ( definitions [ 'auditgroup_a11y-color-contrast_fail' ] ( [ baseLhr6 ] ) ) . toEqual ( { value : 1 } ) ;
175185 expect ( definitions [ 'auditgroup_a11y-color-contrast_fail' ] ( [ baseLhr62 ] ) ) . toEqual ( { value : 1 } ) ;
@@ -180,6 +190,7 @@ describe('Statistic Definitions', () => {
180190 expect ( definitions [ 'auditgroup_a11y-color-contrast_fail' ] ( [ baselhr1010 ] ) ) . toEqual ( { value : 1 } ) ;
181191 expect ( definitions [ 'auditgroup_a11y-color-contrast_fail' ] ( [ baselhr1140 ] ) ) . toEqual ( { value : 1 } ) ;
182192 expect ( definitions [ 'auditgroup_a11y-color-contrast_fail' ] ( [ baselhr1200 ] ) ) . toEqual ( { value : 1 } ) ;
193+ expect ( definitions [ 'auditgroup_a11y-color-contrast_fail' ] ( [ baselhr1261 ] ) ) . toEqual ( { value : 1 } ) ;
183194 expect ( definitions [ 'auditgroup_a11y-aria_na' ] ( [ baseLhr5 ] ) ) . toEqual ( { value : 0 } ) ;
184195 expect ( definitions [ 'auditgroup_a11y-aria_na' ] ( [ baseLhr6 ] ) ) . toEqual ( { value : 2 } ) ;
185196 expect ( definitions [ 'auditgroup_a11y-aria_na' ] ( [ baseLhr62 ] ) ) . toEqual ( { value : 2 } ) ;
@@ -190,6 +201,7 @@ describe('Statistic Definitions', () => {
190201 expect ( definitions [ 'auditgroup_a11y-aria_na' ] ( [ baselhr1010 ] ) ) . toEqual ( { value : 9 } ) ;
191202 expect ( definitions [ 'auditgroup_a11y-aria_na' ] ( [ baselhr1140 ] ) ) . toEqual ( { value : 9 } ) ;
192203 expect ( definitions [ 'auditgroup_a11y-aria_na' ] ( [ baselhr1200 ] ) ) . toEqual ( { value : 9 } ) ;
204+ expect ( definitions [ 'auditgroup_a11y-aria_na' ] ( [ baselhr1261 ] ) ) . toEqual ( { value : 9 } ) ;
193205 } ) ;
194206 } ) ;
195207} ) ;
0 commit comments