Recently, while working with Jasmine and Typescript, our team has begun utilizing the this
context in both the beforeEach
and it
functions.
For example:
beforeEach(() => {
this.fixture = TestBed.createComponent(blablabla);
});
it('should do something', () => {
expect(this.fixture).toBeTruthy();
});
Despite this, TypeScript seems to struggle recognizing that the this
within beforeEach
is the same as in it
. Is there a simple way to inform TypeScript of this connection?
Is it possible to resolve this issue at all?