UNPKG

@serenity-js/core

Version:

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

17 lines (12 loc) 407 B
import { ensure, isDefined, TinyType } from 'tiny-types'; export class Description extends TinyType { public readonly value: string; static fromJSON(v: string): Description { return new Description(v); } constructor(value: string) { super(); ensure('value', value, isDefined()); this.value = value.split('\n').map(line => line.trim()).join('\n'); } }