Skip to content

Commit

Permalink
refactor(core): sanitize reactivity tests
Browse files Browse the repository at this point in the history
It was intriguing to see a double `fixture.detectChanges()` introduced by 38c9f08
It turns out this is not needed.
  • Loading branch information
cexbrayat committed Nov 8, 2023
1 parent 5ebb361 commit 8aac040
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/core/test/render3/reactivity_spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ describe('effects', () => {
expect(cleanupCount).toBe(2);
});

it('should run effects created in ngAfterViewInit', async () => {
it('should run effects created in ngAfterViewInit', () => {
let didRun = false;

@Component({
Expand Down Expand Up @@ -273,7 +273,7 @@ describe('effects', () => {
expect(fixture.nativeElement.textContent).toBe('1');
});

it('should not execute query setters in the reactive context', async () => {
it('should not execute query setters in the reactive context', () => {
const state = signal('initial');

@Component({
Expand Down Expand Up @@ -325,7 +325,7 @@ describe('effects', () => {
expect(fixture.componentInstance.noOfCmpCreated).toBe(1);
});

it('should allow toObservable subscription in template (with async pipe)', async () => {
it('should allow toObservable subscription in template (with async pipe)', () => {
@Component({
selector: 'test-cmp',
standalone: true,
Expand All @@ -339,7 +339,6 @@ describe('effects', () => {
const fixture = TestBed.createComponent(Cmp);
expect(() => fixture.detectChanges(true)).not.toThrow();
fixture.detectChanges();
fixture.detectChanges();

expect(fixture.nativeElement.textContent).toBe('0');
});
Expand Down

0 comments on commit 8aac040

Please sign in to comment.