You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As discussed in following issue #648 , setInput has to accept alias named inputs.
This issue is currrently marked as closed because linked PR #652 provided a corresponding fix to the problem on the unit setInput, but not to the one taking an object as parameter.
This code currently failed to compile:
@Component({selector: 'app-root',standalone: true,template: ``,styles: ``,changeDetection: ChangeDetectionStrategy.OnPush,})exportclassTestComponent{name=input<string>();inputWithAlias=input<string>('',{alias: 'input'});}describe('AppComponent',()=>{
let spectator: Spectator<TestComponent>;constcreateComponent=createComponentFactory(TestComponent);it('respect the alias input names',()=>{spectator=createComponent({detectChanges: false,});spectator.setInput({name: 'test',input: 'testAlias',// <--- compilation failed here});});});
I linked a reproduction link to see compilation error in the code.
Please provide a link to a minimal reproduction of the bug
Is this a regression?
Yes
Description
As discussed in following issue #648 , setInput has to accept alias named inputs.
This issue is currrently marked as closed because linked PR #652 provided a corresponding fix to the problem on the unit setInput, but not to the one taking an object as parameter.
This code currently failed to compile:
I linked a reproduction link to see compilation error in the code.
Please provide a link to a minimal reproduction of the bug
https://stackblitz.com/edit/stackblitz-starters-dqmjiled?file=src%2Ftest.spec.ts
Please provide the exception or error you saw
Please provide the environment you discovered this bug in
Anything else?
No response
Do you want to create a pull request?
Yes
The text was updated successfully, but these errors were encountered: