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>;

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

RxJS. Delay from array

import { of, from } from 'rxjs'; 
import { map, concatMap, delay } from 'rxjs/operators';

from([2,4,6,8]).pipe(
  concatMap(item => of(item).pipe(delay(1000)))
).subscribe(console.log);

JS. Get query param

function getQueryParam(item) {
  var svalue = window.location.search.match(new RegExp('[\?\&]' + item + '=([^\&]*)(\&?)', 'i'));
  return svalue ? svalue[1] : svalue;
}

// /foo/bar/baz.html?lang=ru
var lang = getQueryParam('lang') || 'en';