[19.1.x]: Migrate more jasmine tests#29427
Merged
alan-agius4 merged 3 commits intoangular:19.1.xfrom Jan 21, 2025
Merged
Conversation
…ia test runner in pnpm workspaces
Currently when operating within a pnpm workspace and leveraging the
schematic test runner, there are situations where e.g.
`@schematics/angular` cannot be resolved. Consider this pnpm node
modules structure:
```
packages/
pwa/
node_modules/@schematics/angular --> .pnpm-store/@schematics/angular/...
node_modules/@angular-devkit/schematics --> .pnpm-store/@angular-devkit/schematics/...
index_spec.js // trying to call external schematic `@schematics/angular`
```
This above setup will fail because `@schematics/angular` is attempted to
be resolved from within the devkit schematics code, which doesn't have
access, or a dependency on `@schematics/angular`. We can use the
specified collection of the test runner to determine a good "resolution
lookup site", similiar to how it happens with the real `ng update`
command.
This commit changes the execution of `@angular/pwa` tests to `rules_js` native `jasmine_test`. This requires setting it up in the pnpm workspace for first-party linked dependencies. Notably it turns out the peer dependency placeholder was incorrect, so we are fixing it here and nicely avoid a problem where pnpm would otherwise not find a local, or external suitable version. As we originally tried to work without the fix for the peer dependency range, there was supported added for extra substitutions. We are keeping that logic as it will likely be useful in the future.
Migrates the `@angular-devkit/build-webpack` jasmine tests to `rules_js`. This requires wiring up in the pnpm workspace. Additionally `typescript` is added as it was missing as a "peer dependency" at runtime for `@ngtools/webpack`. This is expected, and we're already adding other peer deps before this change.
alan-agius4
approved these changes
Jan 21, 2025
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Patch port of #29423