You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tests/diff.ts
+35-25Lines changed: 35 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -187,6 +187,7 @@ const allTestNames = new Set(
187
187
);
188
188
constsummaryLines: string[]=[];
189
189
190
+
lethasRegressions=false;
190
191
for(consttestofallTestNames){
191
192
constcurrentSubtests=currentTestMap[test];
192
193
constpreviousSubtests=previousTestMap[test];
@@ -224,7 +225,7 @@ for (const test of allTestNames) {
224
225
letsummary: string|null=null;
225
226
226
227
if(!after){
227
-
summary='(Removed)';
228
+
summary='(removed)';
228
229
}else{
229
230
constdiffLines: string[]=[];
230
231
for(constbrowserofallBrowsers){
@@ -235,6 +236,10 @@ for (const test of allTestNames) {
235
236
continue;
236
237
}
237
238
239
+
if(wasPassing&&!isPassing){
240
+
hasRegressions=true;
241
+
}
242
+
238
243
constprefix=isPassing ? '+' : '-';
239
244
diffLines.push(`${prefix}${browser}`);
240
245
}
@@ -282,32 +287,37 @@ ${testSummary.join('\n')}
282
287
}
283
288
}
284
289
285
-
if(summaryLines.length>0){
286
-
constcommentLines: string[]=[];
290
+
constcommentLines: string[]=[];
291
+
if(process.env.SCHEDULED_BASELINE_DIFF){
287
292
commentLines.push(
288
-
'The [Web Platform Test](https://web-platform-tests.org/) results have changed from the expected baseline. The baseline may be updated by merging this pull request.'
293
+
'The [Web Platform Test](https://web-platform-tests.org/) results have changed from the expected baseline. You may accept these changes by merging this pull request.'
289
294
);
295
+
}
290
296
291
-
if(missingBrowsers.size>0){
292
-
commentLines.push(
293
-
'',
294
-
`
295
-
> **Warning**
296
-
> The test run was missing data for the following browsers:
297
-
>
298
-
${Array.from(missingBrowsers)
299
-
.map(browser=>`> * ${browser}`)
300
-
.join('\n')}
301
-
>
302
-
> Therefore I couldn't confirm the expected tests are still passing.
303
-
`
304
-
);
305
-
}
306
-
307
-
commentLines.push('','# Test Results', ...summaryLines);
0 commit comments