Files
vscode/extensions/copilot/test/simulation/workbench/stores/runnerTestStatus.ts
T
kieferrm 333d9a4053 Hello Copilot
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
2025-06-27 11:35:20 +02:00

46 lines
1.1 KiB
TypeScript

/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import * as mobx from 'mobx';
import { TestRun } from './testRun';
export class RunnerTestStatus {
@mobx.observable
public readonly runs: TestRun[];
@mobx.observable
public isNowRunning: number;
@mobx.observable
public isCancelled: boolean;
@mobx.observable
public isSkipped: boolean;
constructor(
public readonly name: string,
public readonly expectedRuns: number,
runs: TestRun[],
isNowRunning: number = 0,
isCancelled: boolean = false,
isSkipped: boolean = false
) {
this.runs = runs;
this.isNowRunning = isNowRunning;
this.isCancelled = isCancelled;
this.isSkipped = isSkipped;
mobx.makeObservable(this);
}
public addRun(run: TestRun) {
this.runs.push(run);
this.runs.sort((a, b) => {
return (a.runNumber ?? 0) - (b.runNumber ?? 0);
});
}
}