UNPKG

@serenity-js/core

Version:

The core Serenity/JS framework, providing the Screenplay Pattern interfaces, as well as the test reporting and integration infrastructure

24 lines 886 B
import { ensure, isDefined } from 'tiny-types'; import { CorrelationId, ScenarioDetails } from '../model/index.js'; import { Timestamp } from '../screenplay/index.js'; import { DomainEvent } from './DomainEvent.js'; /** * Emitted by a Serenity/JS test runner adapter when a test scenario and its associated test hooks are about to start. * * @group Events */ export class SceneStarts extends DomainEvent { sceneId; details; static fromJSON(o) { return new SceneStarts(CorrelationId.fromJSON(o.sceneId), ScenarioDetails.fromJSON(o.details), Timestamp.fromJSON(o.timestamp)); } constructor(sceneId, details, timestamp) { super(timestamp); this.sceneId = sceneId; this.details = details; ensure('sceneId', sceneId, isDefined()); ensure('details', details, isDefined()); } } //# sourceMappingURL=SceneStarts.js.map