Jasmine. createSpyObj with properties

const veppUpdateServiceSpy = {
...jasmine.createSpyObj('VeppUpdateService', [ // <== spy object
  'notify$',                                   // <== properties    
  'lastNotify',
  'addSubscribeParam',
  'deleteSubscribeParam',
]),
notify$: from([
  {
    data: { id: 100 },
    main_table: IspTableName.SITE,
    type: NotifyTypes.CREATE,
  },
  {
    data: { id: 93 },
    main_table: IspTableName.SITE,
    type: NotifyTypes.UPDATE,
  },
  {
    data: { id: 93 },
    main_table: IspTableName.SITE,
    type: NotifyTypes.DELETE,
  },
]).pipe(
  // tslint:disable-next-line:no-magic-numbers
  delay(500)
),
} as jasmine.SpyObj<VeppUpdateService>;

Похожие записи

Добавить css link и js script динамически

const link = document.createElement('link');
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = 'https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css';
link.integrity = 'sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO'; // необязательно
link.crossOrigin = 'anonymous'; // необязательно
document.head.appendChild(link);

const script = document.createElement('script');
script.src = 'https://code.jquery.com/jquery-3.3.1.slim.min.js';
script.integrity = 'sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo'; // необязательно
s...