MCPcopy Create free account
hub / github.com/angular/angular / TestComponent

Class TestComponent

packages/core/test/resource/resource_spec.ts:967–976  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

965
966 it('should allow stream from input()', async () => {
967 @Component({
968 template: `{{ res.value() }}`,
969 })
970 class TestComponent {
971 @Input() value = '';
972 res = resource({
973 params: () => this.value,
974 stream: ({params}) => signal({value: params + ' done'}),
975 });
976 }
977
978 const fixture = TestBed.createComponent(TestComponent, {
979 bindings: [inputBinding('value', signal('a'))],

Callers

nothing calls this directly

Calls 4

ComponentInterface · 0.90
InputInterface · 0.90
resourceFunction · 0.90
signalFunction · 0.90

Tested by

no test coverage detected