Is there a way to mock the value of a hard private property in a unit test? For example, how can I expect something like
expect(event.getEventHis()).toBeEqual(['a', 'b'])
export class EventController {
#event: [];
constructor() {
this.#event = [];
this.#lastIndex = 0;
}
getEventHis(): [] {
return this.#event;
}
getLastIndex(): number {
return this.#lstastIndex;
}
}
``