Skip to content

Commit

Permalink
chore: refactor after review
Browse files Browse the repository at this point in the history
  • Loading branch information
pawelfras committed Jan 22, 2025
1 parent 49a9f41 commit b7e1b3d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
7 changes: 4 additions & 3 deletions docs/migration/2211_ng19/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
Before upgrading Spartacus to the new version with Angular 18, you need to first:

- upgrade Spartacus to version 2211.32.1
- install Node 22 version and upgrade `@types/node` to version 22
- install Node 22 version
- upgrade `@types/node` to version 22
```bash
npm i @types/node@22
```
Expand All @@ -15,7 +16,7 @@ Before upgrading Spartacus to the new version with Angular 18, you need to first

> **Warning**
>
> Do not select `use-application-builder` migration when migrating to Angular 18. Applications created before SPA 2211.19 doesn't support this builder. Applications ?created starting from 2211.19 already supports it.
> Do not select `use-application-builder` migration when migrating to Angular 18. Applications created before SPA 2211.19 doesn't support this builder. Applications created starting from 2211.19 already support it.
Follow the [Angular guidelines for upgrading from v17 to v18](https://angular.dev/update-guide?v=17.0-18.0&l=3) and bump the Angular version locally, and update other 3rd party dependencies from Angular ecosystem to versions compatible with Angular 18 (e.g. `@ng-select/ng-select@13`, `@ngrx/store@18`, `ngx-infinite-scroll@18`):

Expand All @@ -30,7 +31,7 @@ git commit -m "update angular 18 and 3rd party deps angular 18 compatible"

> **Warning**
>
> Hit SPACE to unselect `use-application-builder` migration when migrating to Angular 19. Applications created before SPA 2211.19 doesn't support this builder. Applications created starting from 2211.19 already supports it.
> Hit SPACE to unselect `use-application-builder` migration when migrating to Angular 19. Applications created before SPA 2211.19 doesn't support this builder. Applications created starting from 2211.19 already support it.
Follow the [Angular guidelines for upgrading from v18 to v19](https://angular.dev/update-guide?v=18.0-19.0&l=3) and bump the Angular version locally, and update other 3rd party dependencies from Angular ecosystem to versions compatible with Angular 19 (e.g. `@ng-select/ng-select@14`, `@ngrx/store@19`, `ngx-infinite-scroll@19`):

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ describe('TrendingSearchesService', () => {
{ searchPhrase: 'test1', count: 10 },
{ searchPhrase: 'test2', count: 15 },
];
let searchPhrases: SearchPhrases[] = [];

const subscription = service.getTrendingSearches().subscribe((result) => {
// Verify the result
expect(result).toEqual(mockSearchPhrases);
searchPhrases = result;
});

// Fast-forward through the availability check
Expand All @@ -97,6 +97,9 @@ describe('TrendingSearchesService', () => {
expect(req.request.method).toBe('GET');
req.flush({ searchPhrases: mockSearchPhrases });

// Verify the result
expect(searchPhrases).toEqual(mockSearchPhrases);

// Clean up
subscription.unsubscribe();
service.ngOnDestroy();
Expand Down

0 comments on commit b7e1b3d

Please sign in to comment.