@@ -23,6 +23,8 @@ const baseLhr800_ = require('../fixtures/lh-8-0-0-coursehero-a.json');
23
23
const baselhr930_ = require ( '../fixtures/lh-9-3-0-coursehero-a.json' ) ;
24
24
/** @type {any } */
25
25
const 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' ) ;
26
28
const { definitions} = require ( '../../src/api/statistic-definitions.js' ) ;
27
29
28
30
describe ( 'Statistic Definitions' , ( ) => {
@@ -42,6 +44,8 @@ describe('Statistic Definitions', () => {
42
44
const baselhr930 = baselhr930_ ;
43
45
/** @type {LH.Result } */
44
46
const baselhr1010 = baselhr1010_ ;
47
+ /** @type {LH.Result } */
48
+ const baselhr1140 = baselhr1140_ ;
45
49
46
50
describe ( 'meta_lighthouse_version()' , ( ) => {
47
51
const run = definitions . meta_lighthouse_version ;
@@ -55,6 +59,7 @@ describe('Statistic Definitions', () => {
55
59
expect ( run ( [ baseLhr800 ] ) ) . toEqual ( { value : 80000 } ) ;
56
60
expect ( run ( [ baselhr930 ] ) ) . toEqual ( { value : 90300 } ) ;
57
61
expect ( run ( [ baselhr1010 ] ) ) . toEqual ( { value : 100100 } ) ;
62
+ expect ( run ( [ baselhr1140 ] ) ) . toEqual ( { value : 110400 } ) ;
58
63
expect ( run ( [ { ...baseLhr5 , lighthouseVersion : '1.2.3-beta.0' } ] ) ) . toEqual ( { value : 10203 } ) ;
59
64
} ) ;
60
65
@@ -80,6 +85,7 @@ describe('Statistic Definitions', () => {
80
85
expect ( run ( [ high , baseLhr800 , low ] ) . value ) . toBeCloseTo ( 20822.103 ) ;
81
86
expect ( run ( [ high , baselhr930 , low ] ) . value ) . toBeCloseTo ( 20525.578 ) ;
82
87
expect ( run ( [ high , baselhr1010 , low ] ) . value ) . toBeCloseTo ( 21627.392 ) ;
88
+ expect ( run ( [ high , baselhr1140 , low ] ) . value ) . toBeCloseTo ( 80796.283 ) ;
83
89
} ) ;
84
90
} ) ;
85
91
@@ -99,6 +105,7 @@ describe('Statistic Definitions', () => {
99
105
expect ( run ( [ high , baseLhr800 , low ] ) . value ) . toBeCloseTo ( 0.24 ) ;
100
106
expect ( run ( [ high , baselhr930 , low ] ) . value ) . toBeCloseTo ( 0.23 ) ;
101
107
expect ( run ( [ high , baselhr1010 , low ] ) . value ) . toBeCloseTo ( 0.21 ) ;
108
+ expect ( run ( [ high , baselhr1140 , low ] ) . value ) . toBeCloseTo ( 0.32 ) ;
102
109
} ) ;
103
110
} ) ;
104
111
@@ -118,6 +125,7 @@ describe('Statistic Definitions', () => {
118
125
expect ( run ( [ high , baseLhr800 , low ] ) . value ) . toBeCloseTo ( 0.01 ) ;
119
126
expect ( run ( [ high , baselhr930 , low ] ) . value ) . toBeCloseTo ( 0.01 ) ;
120
127
expect ( run ( [ high , baselhr1010 , low ] ) . value ) . toBeCloseTo ( 0.01 ) ;
128
+ expect ( run ( [ high , baselhr1140 , low ] ) . value ) . toBeCloseTo ( 0.01 ) ;
121
129
} ) ;
122
130
} ) ;
123
131
@@ -137,6 +145,7 @@ describe('Statistic Definitions', () => {
137
145
expect ( run ( [ high , baseLhr800 , low ] ) . value ) . toBeCloseTo ( 0.99 ) ;
138
146
expect ( run ( [ high , baselhr930 , low ] ) . value ) . toBeCloseTo ( 0.99 ) ;
139
147
expect ( run ( [ high , baselhr1010 , low ] ) . value ) . toBeCloseTo ( 0.99 ) ;
148
+ expect ( run ( [ high , baselhr1140 , low ] ) . value ) . toBeCloseTo ( 0.99 ) ;
140
149
} ) ;
141
150
} ) ;
142
151
@@ -150,6 +159,7 @@ describe('Statistic Definitions', () => {
150
159
expect ( definitions [ 'auditgroup_a11y-aria_pass' ] ( [ baseLhr800 ] ) ) . toEqual ( { value : 6 } ) ;
151
160
expect ( definitions [ 'auditgroup_a11y-aria_pass' ] ( [ baselhr930 ] ) ) . toEqual ( { value : 8 } ) ;
152
161
expect ( definitions [ 'auditgroup_a11y-aria_pass' ] ( [ baselhr1010 ] ) ) . toEqual ( { value : 8 } ) ;
162
+ expect ( definitions [ 'auditgroup_a11y-aria_pass' ] ( [ baselhr1140 ] ) ) . toEqual ( { value : 9 } ) ;
153
163
expect ( definitions [ 'auditgroup_a11y-color-contrast_fail' ] ( [ baseLhr5 ] ) ) . toEqual ( { value : 0 } ) ;
154
164
expect ( definitions [ 'auditgroup_a11y-color-contrast_fail' ] ( [ baseLhr6 ] ) ) . toEqual ( { value : 1 } ) ;
155
165
expect ( definitions [ 'auditgroup_a11y-color-contrast_fail' ] ( [ baseLhr62 ] ) ) . toEqual ( { value : 1 } ) ;
@@ -158,6 +168,7 @@ describe('Statistic Definitions', () => {
158
168
expect ( definitions [ 'auditgroup_a11y-color-contrast_fail' ] ( [ baseLhr800 ] ) ) . toEqual ( { value : 1 } ) ;
159
169
expect ( definitions [ 'auditgroup_a11y-color-contrast_fail' ] ( [ baselhr930 ] ) ) . toEqual ( { value : 1 } ) ;
160
170
expect ( definitions [ 'auditgroup_a11y-color-contrast_fail' ] ( [ baselhr1010 ] ) ) . toEqual ( { value : 1 } ) ;
171
+ expect ( definitions [ 'auditgroup_a11y-color-contrast_fail' ] ( [ baselhr1140 ] ) ) . toEqual ( { value : 1 } ) ;
161
172
expect ( definitions [ 'auditgroup_a11y-aria_na' ] ( [ baseLhr5 ] ) ) . toEqual ( { value : 0 } ) ;
162
173
expect ( definitions [ 'auditgroup_a11y-aria_na' ] ( [ baseLhr6 ] ) ) . toEqual ( { value : 2 } ) ;
163
174
expect ( definitions [ 'auditgroup_a11y-aria_na' ] ( [ baseLhr62 ] ) ) . toEqual ( { value : 2 } ) ;
@@ -166,6 +177,7 @@ describe('Statistic Definitions', () => {
166
177
expect ( definitions [ 'auditgroup_a11y-aria_na' ] ( [ baseLhr800 ] ) ) . toEqual ( { value : 11 } ) ;
167
178
expect ( definitions [ 'auditgroup_a11y-aria_na' ] ( [ baselhr930 ] ) ) . toEqual ( { value : 9 } ) ;
168
179
expect ( definitions [ 'auditgroup_a11y-aria_na' ] ( [ baselhr1010 ] ) ) . toEqual ( { value : 9 } ) ;
180
+ expect ( definitions [ 'auditgroup_a11y-aria_na' ] ( [ baselhr1140 ] ) ) . toEqual ( { value : 9 } ) ;
169
181
} ) ;
170
182
} ) ;
171
183
} ) ;
0 commit comments