cara menetapkan nilai ke properti readonly di typeScript saat pengujian unit

beforeEach(() => {
    TestBed.configureTestingModule({
      providers: [
        MyService
      ]
    });
    service = TestBed.get(MyService);
    const timeIntervals = 'timeIntervals';
    Object.defineProperty(service, timeIntervals, { value: timeLists });
  });
Graceful Gnat