Skip to content

Commit

Permalink
Sort schedule metafieldIds before JSON stringification for consistenc…
Browse files Browse the repository at this point in the history
…y in tests
  • Loading branch information
jamalsoueidan committed May 30, 2024
1 parent 897671a commit e08f548
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,9 @@ describe("CustomerUpdateOrchestration", () => {
},
{
key: "schedules",
value: JSON.stringify([
schedule2.metafieldId,
schedule.metafieldId,
]),
value: JSON.stringify(
[schedule2.metafieldId, schedule.metafieldId].sort()
),
},
{
key: "active",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const updateUserMetaobject = async ({
},
{
key: "schedules",
value: JSON.stringify(schedules.map((p) => p.metafieldId)),
value: JSON.stringify(schedules.map((p) => p.metafieldId).sort()), //sort is for jest testing
},
{
key: "active",
Expand Down

0 comments on commit e08f548

Please sign in to comment.