MCPcopy Index your code
hub / github.com/angular/angular / SignalGraphTestComponent

Class SignalGraphTestComponent

packages/core/test/debug/ai/signal_graph_spec.ts:20–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18
19 it('should discover signal graph from targeted element', async () => {
20 @Component({
21 selector: 'signal-graph-test-root',
22 template: '<div>Signals test: {{ double() }}</div>',
23 standalone: true,
24 })
25 class SignalGraphTestComponent {
26 private readonly count = signal(1, {debugName: 'count'});
27 protected readonly double = computed(() => this.count() * 2, {debugName: 'double'});
28
29 constructor() {
30 effect(
31 () => {
32 this.double();
33 },
34 {debugName: 'consumer'},
35 );
36 }
37 }
38
39 const fixture = TestBed.createComponent(SignalGraphTestComponent);
40 await fixture.whenStable();

Callers

nothing calls this directly

Calls 4

ComponentInterface · 0.90
signalFunction · 0.90
computedFunction · 0.90
countMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…