| 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(); |