-
Notifications
You must be signed in to change notification settings - Fork 585
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
Enable all tests after bad rebase #5595
Conversation
56b8643
to
09b3179
Compare
cb2b868
to
e42d41c
Compare
@@ -262,6 +263,19 @@ const CONNECTION_LISTENERS = new Listeners<ConnectionNotificationCallback, Liste | |||
}); | |||
|
|||
export class SyncSession { | |||
private static instances = new IterableWeakRefs<SyncSession>(); |
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'll be redoing this to use a simple Set<binding.WeakRef<SyncSession>>
behind a ENABLE_CLEAN_TEST_STATE
flag as per my conversations with @RedBeard0531.
@@ -83,7 +83,10 @@ export type TypeOptions = { | |||
// "Only Realm instances are supported." (which should probably have been "RealmObject") | |||
// instead of relying on the binding to throw. | |||
export function mixedToBinding(realm: binding.Realm, value: unknown): binding.MixedArg { | |||
if (typeof value === "undefined") { | |||
if (typeof value === "string" || typeof value === "number" || typeof value === "boolean" || value === null) { |
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.
There might be other types we should fast-track?
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 looks good, which other types were you thinking of in that case (for fast-track I mean)?
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.
LGTM with some suggestions and questions 🙂
6e2530c
to
6ed9ec1
Compare
@@ -317,7 +317,7 @@ describe.skipIf(environment.missingServer, "User", () => { | |||
.logIn(Realm.Credentials.emailPassword({ email: validEmail, password: validPassword })) | |||
.catch((err) => { | |||
expect(err.message).equals("invalid username/password"); | |||
expect(err.code).equals(50); | |||
expect(err.code).equals(4349); |
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 did the error code change? Was this a core upgrade?
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.
Yep.
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 guess that's a breaking change then :D
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.
Not as I see it. These are not documented, so technically not a part of our public API as per semantic versioning.
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.
Mmm...true. Although if someone were to have code relying on this error code, it would need to be updated.
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.
In any case, this doesn't block this PR from being merged. It was just a bit of a concern I had.
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.
LGTM!
This avoids firing listeners that gets added from other listeners
Co-authored-by: LJ <[email protected]>
Co-authored-by: LJ <[email protected]>
Co-authored-by: LJ <[email protected]>
60f4e6d
to
c7eddda
Compare
While this didn't fix all issues when running on CI it's better than what we had. I'll adress the remaining failures in followup PRs. |
* main: (41 commits) allow useQuery to filter or sort a collection by using a callback (#5513) Fix `realm.create` types and 'requiredProperties' on Realm.Object constructor (#5697) Fix return type of `App.allUsers` (#5708) Removed renamed file Remove console.log Fix README instructions and bump version Bump template versions Update Templates (#5702) Moved "submodules" wireit task to "postinstall" Set up typedoc for realm-react, realm-web (#5709) Prepare for vNext (#5711) Prepare for 12.0.0-alpha.2 (#5707) Build iOS prebuilds in release by default (#5710) Use the event.sender as assignee when preparing release Updated prepare release workflow to print PR url in summary Fixing lint error fix the template app links (#5701) Expose `Sync` as named export (#5705) Enable all tests after bad rebase (#5595) Clear test state flag (#5689) ... # Conflicts: # packages/realm/src/Realm.ts
What, How & Why?
When rebasing
bindgen
ontomain
we introduced a bad merge as tests onv11
was enumerated from a different file than that onbindgen
, which resulted in many tests not being enabled.This PR corrects this and fix all the remaining failures.