-
Notifications
You must be signed in to change notification settings - Fork 14
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
feat(chore): Upgrade Angular v14 #191
feat(chore): Upgrade Angular v14 #191
Conversation
This PR is based on chore: Upgrade to Angular v14 #186 PR Took his changes, modified it to pass the tests and build |
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.
@tse018 Than you for the contribution! I left some comments :)
const translationService = injector.get(TranslationService); | ||
|
||
Object.defineProperty(target, key, { | ||
configurable: false, | ||
get: () => { | ||
if (instanceConfig) { |
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.
I wonder why you removed the instanceConfig
and the mechanism to add an instance. If I understand well, this way you need to create the instance (addInstance
) beforehand, correct?
@@ -14,20 +14,6 @@ import { TranslationService } from './translation.service'; | |||
styles: [], | |||
}) | |||
|
|||
/** | |||
* A translation component |
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.
Why remove the detailed comments?
@@ -81,34 +71,38 @@ describe('LanguagePickerComponent', () => { | |||
spyOn(component, 'onChange').and.callThrough(); | |||
|
|||
// act | |||
await component.ngOnInit(); | |||
await component.getLanguages(); |
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.
Here I would like to test the ngOnInit
event, in order to test if the languages are loaded correctly at that stage. Is there any reason for replacing it?
@@ -63,7 +53,7 @@ describe('LanguagePickerComponent', () => { | |||
spyOn(service, 'getLanguages').and.resolveTo(languages); | |||
|
|||
// act | |||
await component.ngOnInit(); | |||
await component.getLanguages(); |
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.
Here I would like to test the ngOnInit event, in order to test if the languages are loaded correctly at that stage. Is there any reason for replacing it?
it('is defined', () => { | ||
expect(TranslatePipe).toBeDefined(); | ||
expect(translatePipe).toBeDefined(); | ||
expect(translatePipe instanceof TranslatePipe).toBeTruthy(); | ||
expect(true).toBeTruthy(); |
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.
What about this? Maybe we need to revert this change?
Oh, ok, I should understand it :) sorry. Maybe in the previous review I missed that with the instances. I need to test the refactored part and back again maybe we need to change that part to the previous version, will see. |
@tse018 Can you please make a squash of commits and I'll approve for merging. Thanks! |
3c86e5d
to
88b2fcf
Compare
No description provided.