Skip to content

Commit afdcff3

Browse files
leonsenftpkozlowski-opensource
authored andcommitted
test(core): fix expectations that accidentally used incorrect matchers (#55294)
Expect that the number of template executions is `===` to a number, rather than expect that it does not contain a number. As they were, these expectations would pass regardless of the expected value. PR Close #55294
1 parent 051c140 commit afdcff3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/core/test/acceptance/change_detection_signals_in_zones_spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ describe('CheckAlways components', () => {
181181
class App {
182182
val = val;
183183
ngOnInit() {
184-
this.val.update(v => v+1);
184+
this.val.update(v => v + 1);
185185
}
186186
}
187187
const fixture = TestBed.createComponent(App);
@@ -433,12 +433,12 @@ describe('OnPush components with signals', () => {
433433

434434
fixture.detectChanges();
435435
expect(fixture.nativeElement.outerHTML).not.toContain('blue');
436-
expect(fixture.componentInstance.numTemplateExecutions).not.toContain(1);
436+
expect(fixture.componentInstance.numTemplateExecutions).toBe(1);
437437

438438
useBlue.set(true);
439439
fixture.detectChanges();
440440
expect(fixture.nativeElement.outerHTML).toContain('blue');
441-
expect(fixture.componentInstance.numTemplateExecutions).not.toContain(1);
441+
expect(fixture.componentInstance.numTemplateExecutions).toBe(1);
442442
});
443443

444444
it('can read a signal in a host binding', () => {

0 commit comments

Comments
 (0)