-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Objects, arrays and models changes deep checks when checking if a mod…
…el is dirty.
- Loading branch information
Showing
7 changed files
with
91 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -142,23 +142,21 @@ it("save with modified submodels", () => { | |
title: "this is a test", | ||
authors: [ | ||
{ name: "DOE", firstName: "John", email: "[email protected]", createdAt: (new Date()).toISOString(), active: true, }, | ||
{ name: "TEST", firstName: "Another", email: "[email protected]", createdAt: (new Date()).toISOString(), active: false, }, | ||
{ name: "TEST", firstName: "Another", email: "[email protected]", createdAt: (new Date("1997-09-09")).toISOString(), active: false, }, | ||
], | ||
text: "this is a long test.", | ||
evaluation: "25.23", | ||
tags: [ {name: "test"}, {name: "foo"} ], | ||
}); | ||
|
||
article.authors = article.authors.map((author) => { | ||
author.name = "TEST"; | ||
return author; | ||
}); | ||
article.authors[0].name = "TEST"; | ||
article.authors[1].createdAt.setMonth(9); | ||
|
||
expect(article.save()).toStrictEqual({ | ||
id: 1, | ||
authors: [ | ||
{ name: "TEST", }, | ||
{}, //{ name: "TEST", firstName: "Another", email: "[email protected]" }, | ||
{ name: "TEST" }, | ||
{ createdAt: (new Date("1997-10-09")).toISOString() }, //{ name: "TEST", firstName: "Another", email: "[email protected]" }, | ||
], | ||
}); | ||
}); | ||
|