From cb40f95a521b7cfb8582d8b7aabeb0e0c3819fec Mon Sep 17 00:00:00 2001 From: Madeorsk Date: Thu, 4 Aug 2022 15:05:27 +0200 Subject: [PATCH] Improve tests of ModelFromRepositoryType. --- tests/ModelFromRepositoryType.test.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/ModelFromRepositoryType.test.ts b/tests/ModelFromRepositoryType.test.ts index 57f2fb4..2273553 100644 --- a/tests/ModelFromRepositoryType.test.ts +++ b/tests/ModelFromRepositoryType.test.ts @@ -42,4 +42,9 @@ it("get the same object after two deserializations", () => { // `a` of `secondB` should be `a` of `firstB`. expect(secondB.a).toBe(firstB.a); + + // If something changes in A instance of firstB, + // A instance of secondB should have the same modification (as it should be the same instance). + firstB.a.foo = "test"; + expect(secondB.a.foo).toStrictEqual("test"); });