From 830caa1f964166564814cef375142fa7a958983b Mon Sep 17 00:00:00 2001 From: LJ <81748770+elle-j@users.noreply.github.com> Date: Wed, 10 Jul 2024 09:34:28 +0200 Subject: [PATCH] Remove key path listener test for embedded object. --- .../tests/src/tests/observable.ts | 57 ------------------- 1 file changed, 57 deletions(-) diff --git a/integration-tests/tests/src/tests/observable.ts b/integration-tests/tests/src/tests/observable.ts index fdaf55f6c7..7a5beb5cb4 100644 --- a/integration-tests/tests/src/tests/observable.ts +++ b/integration-tests/tests/src/tests/observable.ts @@ -993,63 +993,6 @@ describe("Observable", () => { ); }); - it("fires on relevant changes to an embedded object", async function (this: RealmObjectContext) { - const collection = this.realm.objects("Person"); - - await expectCollectionNotifications( - collection, - ["embeddedAddress"], - [ - EMPTY_COLLECTION_CHANGESET, - () => { - this.realm.write(() => { - this.object.embeddedAddress = { street: "1633 Broadway", city: "New York" }; - }); - expect(this.object.embeddedAddress).deep.equals({ street: "1633 Broadway", city: "New York" }); - }, - { - deletions: [], - insertions: [], - newModifications: [0], - oldModifications: [0], - }, - () => { - this.realm.write(() => { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - this.object.embeddedAddress!.street = "88 Kearny Street"; - }); - expect(this.object.embeddedAddress?.street).equals("88 Kearny Street"); - }, - { - deletions: [], - insertions: [], - newModifications: [0], - oldModifications: [0], - }, - () => { - this.realm.write(() => { - // eslint-disable-next-line @typescript-eslint/no-non-null-assertion - this.object.embeddedAddress!.city = "San Francisco"; - }); - expect(this.object.embeddedAddress?.city).equals("San Francisco"); - }, - { - deletions: [], - insertions: [], - newModifications: [0], - oldModifications: [0], - }, - // Perform a couple of changes that shouldn't trigger the listener. - () => { - this.realm.write(() => { - this.object.name = "New Name"; - }); - expect(this.object.name).equals("New Name"); - }, - ], - ); - }); - it("fires on relevant changes to a wildcard", async function (this: RealmObjectContext) { const collection = this.realm.objects("Person").filtered("name = $0 OR age = 42", "Alice"); await expectCollectionNotifications(