Skip to content

Commit

Permalink
doctest debug reporter xml->console
Browse files Browse the repository at this point in the history
  • Loading branch information
matepek committed Feb 21, 2021
1 parent c47f5b4 commit 3f2da34
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [Unreleased]

## [3.6.21]

### Changed

- DOCTest output reporter in case of debugging has changed `xml` -> `console`

## [3.6.20] - 2021-01-27

## [3.6.19] - 2020-12-23
Expand Down
16 changes: 11 additions & 5 deletions src/framework/DOCRunnable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,15 +141,14 @@ export class DOCRunnable extends AbstractRunnable {
return result;
}

protected _getRunParamsInner(childrenToRun: readonly Readonly<DOCTest>[]): string[] {
private _getRunParamsCommon(childrenToRun: readonly Readonly<DOCTest>[]): string[] {
const execParams: string[] = [];

const testNames = childrenToRun.map(c => c.getEscapedTestName());
execParams.push('--test-case=' + testNames.join(','));
execParams.push('--no-skip=true');

execParams.push('--case-sensitive=true');
execParams.push('--reporters=xml');
execParams.push('--duration=true');

if (this._shared.isNoThrow) execParams.push('--no-throw=true');
Expand All @@ -162,10 +161,17 @@ export class DOCRunnable extends AbstractRunnable {
return execParams;
}

protected _getRunParamsInner(childrenToRun: readonly Readonly<DOCTest>[]): string[] {
const execParams: string[] = this._getRunParamsCommon(childrenToRun);
execParams.push('--reporters=xml');
return execParams;
}

// eslint-disable-next-line
protected _getDebugParamsInner(childrenToRun: readonly Readonly<AbstractTest>[], breakOnFailure: boolean): string[] {
const params = this._getRunParamsInner(childrenToRun as readonly Readonly<DOCTest>[]);
return params;
protected _getDebugParamsInner(childrenToRun: readonly Readonly<DOCTest>[], breakOnFailure: boolean): string[] {
const execParams: string[] = this._getRunParamsCommon(childrenToRun);
execParams.push('--reporters=console');
return execParams;
}

protected _handleProcess(testRunId: string, runInfo: RunningRunnable): Promise<void> {
Expand Down

0 comments on commit 3f2da34

Please sign in to comment.