| 835 | |
| 836 | it('should disallow writing to signals within computed', () => { |
| 837 | @Component({ |
| 838 | selector: 'with-input', |
| 839 | template: '{{comp()}}', |
| 840 | }) |
| 841 | class WriteComputed { |
| 842 | sig = signal(0); |
| 843 | comp = computed(() => { |
| 844 | this.sig.set(this.sig() + 1); |
| 845 | return this.sig(); |
| 846 | }); |
| 847 | } |
| 848 | |
| 849 | const fixture = TestBed.createComponent(WriteComputed); |
| 850 |