UNPKG

@serenity-js/core

Version:

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

30 lines 879 B
import { ensure, isDefined } from 'tiny-types'; import { CorrelationId } from '../model/index.js'; import { Timestamp } from '../screenplay/index.js'; import { DomainEvent } from './DomainEvent.js'; /** * Indicates that the test runner will retry running the test scenario upon failure. * * @group Events */ export class RetryableSceneDetected extends DomainEvent { sceneId; /** * Deserialises the event from a JSONObject * * @param o */ static fromJSON(o) { return new RetryableSceneDetected(CorrelationId.fromJSON(o.sceneId), Timestamp.fromJSON(o.timestamp)); } /** * @param sceneId * @param [timestamp] */ constructor(sceneId, timestamp) { super(timestamp); this.sceneId = sceneId; ensure('sceneId', sceneId, isDefined()); } } //# sourceMappingURL=RetryableSceneDetected.js.map