Skip to content

Commit

Permalink
master: small refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
Mate Pek committed Nov 23, 2021
1 parent 4f04ca4 commit 7077e82
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/AbstractExecutable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ export abstract class AbstractExecutable implements Disposable {
if (leftBehindBuilder) {
debugAssert(!leftBehindBuilder.built, "if it is built it shouldn't be passed");
switch (result.value) {
case ExecutableRunResultValue.Ok:
case ExecutableRunResultValue.OK:
{
this.shared.log.errorS('builder should not left behind if no problem', this, leftBehindBuilder);
leftBehindBuilder.addOutputLine(0, '❗️ Test run has been cancelled by user.');
Expand Down
10 changes: 5 additions & 5 deletions src/RunningExecutable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { assert } from './util/DevelopmentHelper';
///

export enum ExecutableRunResultValue {
Ok,
OK,
CancelledByUser,
TimeoutByUser,
Errored,
Expand All @@ -23,13 +23,13 @@ export class ExecutableRunResult {
private constructor(public readonly value: ExecutableRunResultValue, private readonly _error: string | undefined) {}

public get Ok(): boolean {
return this.value === ExecutableRunResultValue.Ok;
return this.value === ExecutableRunResultValue.OK;
}

public toString(): string {
switch (this.value) {
case ExecutableRunResultValue.Ok:
return 'Ok';
case ExecutableRunResultValue.OK:
return 'Exit(0) / OK';
case ExecutableRunResultValue.CancelledByUser:
return 'CancelledByUser';
case ExecutableRunResultValue.TimeoutByUser:
Expand All @@ -41,7 +41,7 @@ export class ExecutableRunResult {
}

public static Ok(): ExecutableRunResult {
return new ExecutableRunResult(ExecutableRunResultValue.Ok, undefined);
return new ExecutableRunResult(ExecutableRunResultValue.OK, undefined);
}

public static Error(message: string): ExecutableRunResult {
Expand Down
3 changes: 3 additions & 0 deletions src/framework/Catch2Executable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,9 @@ export class Catch2Executable extends AbstractExecutable {
if (this._catch2Version && this._catch2Version.major >= 3) args.push('--reporter', 'xml');

this.shared.log.info('discovering tests', this.properties.path, args, this.properties.options.cwd);

//const process = await this.properties.spawner.spawn(this.properties.path, args, this.properties.options);

const catch2TestListOutput = await this.properties.spawner.spawnAsync(
this.properties.path,
args,
Expand Down

0 comments on commit 7077e82

Please sign in to comment.