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

Class SignalGraphTestComponent

packages/core/test/debug/ai/signal_graph_spec.ts:20–35  ·  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 template: '<div>Signals test: {{ double() }}</div>',
22 })
23 class SignalGraphTestComponent {
24 private readonly count = signal(1, {debugName: 'count'});
25 protected readonly double = computed(() => this.count() * 2, {debugName: 'double'});
26
27 constructor() {
28 effect(
29 () => {
30 this.double();
31 },
32 {debugName: 'consumer'},
33 );
34 }
35 }
36
37 const fixture = TestBed.createComponent(SignalGraphTestComponent);
38 await fixture.whenStable();

Callers

nothing calls this directly

Calls 4

ComponentInterface · 0.90
signalFunction · 0.90
computedFunction · 0.90
countMethod · 0.65

Tested by

no test coverage detected