Which @angular/* package(s) are relevant/related to the feature request?
core
Description
Given the following simple directive with a signal input:
@Directive({
selector: '[appSimple]',
standalone: true,
host: {
'(click)': 'doSomething()',
}
})
export class SimpleDirective {
data = input.required<string>();
doSomething() {
console.log(this.data());
}
}
There is no way for me to write a test because I can not create a "DirectiveFixture" where I can "setInput"
Proposed solution
Provide a similar approach as TestBed.compileComponents but for directives.
Alternatives considered
Stick with requiring wrapper components to test, but add documentation when input signals become available as part of the public API.
Which @angular/* package(s) are relevant/related to the feature request?
core
Description
Given the following simple directive with a signal input:
There is no way for me to write a test because I can not create a "DirectiveFixture" where I can "setInput"
Proposed solution
Provide a similar approach as
TestBed.compileComponentsbut for directives.Alternatives considered
Stick with requiring wrapper components to test, but add documentation when input signals become available as part of the public API.