Skip to content

Commit

Permalink
chore(bidi): mark test expected to timeout as fixme (#34176)
Browse files Browse the repository at this point in the history
  • Loading branch information
yury-s authored Dec 31, 2024
1 parent b2cbe7f commit 7769010
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
14 changes: 10 additions & 4 deletions tests/bidi/csvReporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,21 @@ class CsvReporter implements Reporter {
for (const project of this._suite.suites) {
for (const file of project.suites) {
for (const test of file.allTests()) {
if (test.ok())
// Report fixme tests as failing.
const fixme = test.annotations.find(a => a.type === 'fixme');
if (test.ok() && !fixme)
continue;
const row = [];
row.push(csvEscape(`${file.title} :: ${test.title}`));
row.push(test.expectedStatus);
row.push(test.outcome());
const result = test.results.find(r => r.error);
const errorMessage = stripAnsi(result?.error?.message.replace(/\s+/g, ' ').trim().substring(0, 1024));
row.push(csvEscape(errorMessage ?? ''));
if (fixme) {
row.push('fixme' + (fixme.description ? `: ${fixme.description}` : ''));
} else {
const result = test.results.find(r => r.error);
const errorMessage = stripAnsi(result?.error?.message.replace(/\s+/g, ' ').trim().substring(0, 1024));
row.push(csvEscape(errorMessage ?? ''));
}
rows.push(row);
}
}
Expand Down
3 changes: 1 addition & 2 deletions tests/config/browserTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,7 @@ const test = baseTest.extend<BrowserTestTestFixtures, BrowserTestWorkerFixtures>
}, { scope: 'worker' }],

autoSkipBidiTest: [async ({ bidiTestSkipPredicate }, run) => {
if (bidiTestSkipPredicate(test.info()))
test.skip(true);
test.fixme(bidiTestSkipPredicate(test.info()), 'marked as timeout in bidi expectations');
await run();
}, { auto: true, scope: 'test' }],
});
Expand Down

0 comments on commit 7769010

Please sign in to comment.