mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-23 08:39:54 +01:00
333d9a4053
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
46 lines
1.1 KiB
TypeScript
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);
|
|
});
|
|
}
|
|
}
|