I had a parent class and a child class(actually a component class) extends from super class, consider of the protect of data, I defined all the member as protected. When doing unit test, I was told that I can't access protected member. How should I test it?
describe("child class", () => {
let child: Child;
beforeEach(() => {
child = new Child();
});
describe("Initialization", () => {
expect(child.member).toBe(...);
});
});
Aucun commentaire:
Enregistrer un commentaire