Closed ZsZs closed 1 year ago
Hi,
By writing complex mocks I realized, that an Observable.of mock interface implementation doesn't fire. The following test fail with timeout, cause the Observable never fires.
import { mock } from 'jest-mock-extended'; import { of } from 'rxjs'; interface TestInterface { dummyProperty: string; } describe( 'Test Observable.of mock interface implementation', () => { it( 'test Observable of an Interface mock', (done) => { const mockTestInterface = mock<TestInterface>(); of( mockTestInterface ).subscribe( testObject => { expect( testObject ).toBeTruthy(); done(); }) }) })
What I'm doing wrong, or overseeing?
See https://github.com/marchaos/jest-mock-extended/issues/51
@mrdulin, thank you for your quick response. I had to make the ignorePropes to an Array, but then it compiles and works.
beforeAll( () => { JestMockExtended.configure({ ignoreProps: ['schedule '] }); });
Hi,
By writing complex mocks I realized, that an Observable.of mock interface implementation doesn't fire. The following test fail with timeout, cause the Observable never fires.
What I'm doing wrong, or overseeing?