Path: blob/main/extensions/copilot/test/simulation/workbench/stores/runnerTestStatus.ts
13399 views
/*---------------------------------------------------------------------------------------------1* Copyright (c) Microsoft Corporation. All rights reserved.2* Licensed under the MIT License. See License.txt in the project root for license information.3*--------------------------------------------------------------------------------------------*/45import * as mobx from 'mobx';6import { TestRun } from './testRun';789export class RunnerTestStatus {1011@mobx.observable12public readonly runs: TestRun[];1314@mobx.observable15public isNowRunning: number;1617@mobx.observable18public isCancelled: boolean;1920@mobx.observable21public isSkipped: boolean;2223constructor(24public readonly name: string,25public readonly expectedRuns: number,26runs: TestRun[],27isNowRunning: number = 0,28isCancelled: boolean = false,29isSkipped: boolean = false30) {31this.runs = runs;32this.isNowRunning = isNowRunning;33this.isCancelled = isCancelled;34this.isSkipped = isSkipped;35mobx.makeObservable(this);36}3738public addRun(run: TestRun) {39this.runs.push(run);40this.runs.sort((a, b) => {41return (a.runNumber ?? 0) - (b.runNumber ?? 0);42});43}44}454647