Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(page): remove waitFromAsync from beforeEach #501

Merged
merged 2 commits into from
Nov 30, 2023
Merged

Conversation

kensodemann
Copy link
Member

There is nothing async in the beforeEach to wait for as it is written.

The other option would be to leave it in and then add in the closing parenthesis that is missing on line 12.

There is nothing async in the beforeEach to wait for as it is written.

The other option would be to leave it in and then add in the closing parenthesis that is missing on line 12.
@@ -5,7 +5,7 @@ describe('<%= classify(name) %>Page', () => {
let component: <%= classify(name) %>Page;
let fixture: ComponentFixture<<%= classify(name) %>Page>;

beforeEach(waitForAsync () => {
beforeEach(() => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove the waitForAsync import at the top of the file?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doh! Good catch... Fixed.

Copy link
Contributor

@liamdebeasi liamdebeasi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Verified that the calls we are making do not return a promise:

  1. TestBed.createComponent returns ComponentFixture: https://angular.io/api/core/testing/TestBed#createcomponent
  2. fixture.detectChanges() returns void: https://angular.io/api/core/testing/ComponentFixture#detectchanges

@liamdebeasi liamdebeasi merged commit 55527e7 into main Nov 30, 2023
2 checks passed
@liamdebeasi liamdebeasi deleted the fix/page-test branch November 30, 2023 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants