-
Notifications
You must be signed in to change notification settings - Fork 24.8k
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(migrations): error in standalone migration when non-array value is used as declarations in TestBed #54122
Conversation
…s used as declarations in TestBed Adds some logic to skip over `TestBed.configureTestingModule` calls where the `declarations` aren't initialized to an array. We can't migrate these cases, because test migrations don't have access to the Angular compiler. Previously the migration would throw a runtime error.
isReferenceToImport(typeChecker, node.expression, catalystImport))) { | ||
testObjects.push(node.arguments[0]); | ||
ts.isObjectLiteralExpression(node.arguments[0]); | ||
const config = isObjectLiteralCall ? node.arguments[0] as ts.ObjectLiteralExpression : null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The logic is the same as before, I just moved it out into variables to be more readable.
…s used as declarations in TestBed (#54122) Adds some logic to skip over `TestBed.configureTestingModule` calls where the `declarations` aren't initialized to an array. We can't migrate these cases, because test migrations don't have access to the Angular compiler. Previously the migration would throw a runtime error. PR Close #54122
This PR was merged into the repository by commit 28ad6fc. |
…s used as declarations in TestBed (angular#54122) Adds some logic to skip over `TestBed.configureTestingModule` calls where the `declarations` aren't initialized to an array. We can't migrate these cases, because test migrations don't have access to the Angular compiler. Previously the migration would throw a runtime error. PR Close angular#54122
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Adds some logic to skip over
TestBed.configureTestingModule
calls where thedeclarations
aren't initialized to an array. We can't migrate these cases, because test migrations don't have access to the Angular compiler. Previously the migration would throw a runtime error.