@serenity-js/core
Version:
The core Serenity/JS framework, providing the Screenplay Pattern interfaces, as well as the test reporting and integration infrastructure
28 lines (24 loc) • 721 B
text/typescript
import type { JSONObject } from 'tiny-types';
import type { SerialisedOutcome } from '../model';
import { Outcome } from '../model';
import { Timestamp } from '../screenplay';
import { DomainEvent } from './DomainEvent';
/**
* Emitted when all the test scenarios have finished running.
*
* @group Events
*/
export class TestRunFinished extends DomainEvent {
static fromJSON(o: JSONObject): TestRunFinished {
return new TestRunFinished(
Outcome.fromJSON(o.outcome as SerialisedOutcome),
Timestamp.fromJSON(o.timestamp as string),
);
}
constructor(
public readonly outcome: Outcome,
timestamp?: Timestamp,
) {
super(timestamp);
}
}