-
Notifications
You must be signed in to change notification settings - Fork 42
fix: angular tests in main #1251
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,13 +6,19 @@ | |
"vitest/globals", | ||
"node" | ||
], | ||
"baseUrl": "../", | ||
"paths": { | ||
"angular": [ | ||
"./dist/angular" | ||
] | ||
], | ||
"@openfeature/core": [ "../../shared/src" ], | ||
"@openfeature/web-sdk": [ "../../web/src" ] | ||
}, | ||
"esModuleInterop": true, | ||
"emitDecoratorMetadata": true | ||
"emitDecoratorMetadata": true, | ||
"noImplicitOverride": false, | ||
"noPropertyAccessFromIndexSignature": false, | ||
"strict": false | ||
Comment on lines
+18
to
+21
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I had to add these, because now the ng-test step compiles some code from the shared packages, and doesn't tolerate some stuff there without these.
Comment on lines
+19
to
+21
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Disabling these TypeScript strictness checks ( There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is true, but this is only for test code ( |
||
}, | ||
"include": [ | ||
"src/**/*.spec.ts", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -393,7 +393,7 @@ export class OpenFeatureAPI | |
const maybePromise = wrapper.provider.onContextChange(oldContext, newContext); | ||
|
||
// only reconcile if the onContextChange method returns a promise | ||
if (typeof maybePromise?.then === 'function') { | ||
if (maybePromise && typeof maybePromise?.then === 'function') { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the only thing the ng-compiler was complaining about I could not ignore - obviously there's no real runtime change here, it just makes the compiler happy. |
||
wrapper.incrementPendingContextChanges(); | ||
wrapper.status = this._statusEnumType.RECONCILING; | ||
this.getAssociatedEventEmitters(domain).forEach((emitter) => { | ||
|
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.
This is the fix.