Skip to content

Commit

Permalink
fix(test-runner): unify visual-written representation of skipped tests
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarmarina authored and Westbrook committed May 10, 2024
1 parent 8c0250c commit 43eb130
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions packages/test-runner/src/reporter/summaryReporter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,15 @@ export function summaryReporter(opts: Options): Reporter {
let args: ReporterArgs;
let favoriteBrowser: string;

function log(logger: Logger, name: string, passed: boolean, prefix = ' ', postfix = '') {
const sign = passed ? green('✓') : red('𐄂');
function log(
logger: Logger,
name: string,
passed: boolean,
skipped: boolean,
prefix = ' ',
postfix = '',
) {
const sign = skipped ? dim('-') : passed ? green('✓') : red('𐄂');
if (flatten) logger.log(`${sign} ${name}${postfix}`);
else logger.log(`${prefix} ${sign} ${name}`);
}
Expand All @@ -44,7 +51,7 @@ export function summaryReporter(opts: Options): Reporter {
) {
const browserName = browser?.name ? ` ${dim(`[${browser.name}]`)}` : '';
for (const result of results?.tests ?? []) {
log(logger, result.name, result.passed, prefix, browserName);
log(logger, result.name, result.passed, result.skipped, prefix, browserName);
}

for (const suite of results?.suites ?? []) {
Expand Down

0 comments on commit 43eb130

Please sign in to comment.