@@ -140,8 +140,10 @@ describe('format', () => {
140140 report : '<!doctype html>\n' + '<html lang="en">Hi</html>\n' ,
141141 } ) ;
142142
143- it ( 'should return formatted results' , ( ) => {
144- expect ( formatResults ( { results : getResults ( ) , thresholds : { } } ) ) . toEqual ( {
143+ it ( 'should return formatted results' , async ( ) => {
144+ expect (
145+ await formatResults ( { results : getResults ( ) , thresholds : { } } ) ,
146+ ) . toEqual ( {
145147 details : {
146148 formFactor : undefined ,
147149 installable : false ,
@@ -154,11 +156,11 @@ describe('format', () => {
154156 } ) ;
155157 } ) ;
156158
157- it ( 'should return formatted results with passing thresholds' , ( ) => {
159+ it ( 'should return formatted results with passing thresholds' , async ( ) => {
158160 const thresholds = {
159161 performance : 0.1 ,
160162 } ;
161- const formattedResults = formatResults ( {
163+ const formattedResults = await formatResults ( {
162164 results : getResults ( ) ,
163165 thresholds,
164166 } ) ;
@@ -173,11 +175,11 @@ describe('format', () => {
173175 ] ) ;
174176 } ) ;
175177
176- it ( 'should return formatted results with failing thresholds' , ( ) => {
178+ it ( 'should return formatted results with failing thresholds' , async ( ) => {
177179 const thresholds = {
178180 performance : 1 ,
179181 } ;
180- const formattedResults = formatResults ( {
182+ const formattedResults = await formatResults ( {
181183 results : getResults ( ) ,
182184 thresholds,
183185 } ) ;
@@ -197,7 +199,7 @@ describe('format', () => {
197199 ] ) ;
198200 } ) ;
199201
200- it ( 'should use supplied config settings and data to populate `details`' , ( ) => {
202+ it ( 'should use supplied config settings and data to populate `details`' , async ( ) => {
201203 const results = getResults ( ) ;
202204 results . lhr . configSettings = {
203205 locale : 'es' ,
@@ -208,7 +210,7 @@ describe('format', () => {
208210 score : 1 ,
209211 } ;
210212
211- const formattedResults = formatResults ( { results, thresholds : { } } ) ;
213+ const formattedResults = await formatResults ( { results, thresholds : { } } ) ;
212214 expect ( formattedResults . details ) . toEqual ( {
213215 formFactor : 'desktop' ,
214216 installable : true ,
0 commit comments