Export angular test utils as @a2ui/angular/testing#1737
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the Angular renderer's test files to import testing utilities from the newly created @a2ui/angular/testing package instead of using relative paths. It introduces the testing package structure, including ng-package.json, public-api.ts, and test-utils.ts, and updates the TypeScript configuration paths accordingly. Feedback on the changes points out an incorrect relative path to node_modules in the newly added ng-package.json file, which should be corrected to point to the proper directory level.
|
Agent: Add a note to the Angular changelog about this |
ditman
left a comment
There was a problem hiding this comment.
I have unusually strong feelings about not export * from the public-api, and instead be explicit with what we export from there. That way we can have much tighter control over what we're actually exporting publically, and it's easier to prevent unintentionally exporting things.
Within the library we can use export * as much as we want, but the public API should be explicit if we can.
|
🤖 I have added a note to the Angular changelog under the Unreleased section. |
|
I addressed the comments. Keeping the symlink and inline jasmine type. Please take a look when you can. Thanks! |
ditman
left a comment
There was a problem hiding this comment.
Thanks for adding explicit exports to the public-api!
|
Note: the broken docs presubmit check is a flake. I've seen that link fail many times already. I'll add it to the ignored section, it's very annoying. |
This PR exposes the Angular test utilities under the secondary entry point
@a2ui/angular/v0_9/testingand creates a root-level alias@a2ui/angular/testingfor them. It also refactors the 18 basic component spec files insrc/v0_9to use the new@a2ui/angular/testingalias.This was motivated by 1P code using deep imports to depend on these test utils. The test utils are generally useful not just for 1P, so I'm exporting them with clean aliases here.
Using @a2ui/angular/testing naming following the existing @angular/core/testing alias