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