Closed DArrigoni closed 7 years ago
Since we're ultimately just rendering markup here, you should be able to do something like:
fixture.detectChanges();
let mocked = fixture.debugElement.query(By.css('my-sub-component')).nativeElement;
expect(mocked.nativeElement.getAttribute("[foo]")).toBe('what-you-expect');
Closing this for now -- if it doesn't help, or if you run into any problems, feel free to reopen. Thanks!
Is there support for verifying whether you've correctly bound the right values to a sub-component? If so, how? If not, any suggestions on how to add it?
beforeEach(() => { TestBed.configureTestingModule({ declarations: [ MyComponent, MockMySubComponent ] }).compileComponents();
})
describe('My Sub Component', ()=> { it('should bind bar to foo', ()=> { ?????? });
});