Skip to content

Commit

Permalink
fix(test): adopt coercedBodyEquals
Browse files Browse the repository at this point in the history
For some cases (like Datetime), we should use `coercedBodyEquals` instead of `bodyEquals`
  • Loading branch information
Mingzhe Huang (from Dev Box) committed Oct 14, 2024
1 parent 66c2656 commit 8111dfd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/perfect-balloons-obey.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@azure-tools/cadl-ranch-specs": patch
---

fix(test): adopt `coercedBodyEquals`
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function createServerTests(url: string, value: unknown, patchNullableProperty?:
status: 204,
},
handler: (req: MockRequest) => {
req.expect.bodyEquals({
req.expect.coercedBodyEquals({
requiredProperty: "foo",
nullableProperty: patchNullableProperty || null,
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function createServerTests(url: string, value: unknown) {
status: 204,
},
handler: (req: MockRequest) => {
req.expect.bodyEquals(value);
req.expect.coercedBodyEquals(value);
return {
status: 204,
};
Expand Down

0 comments on commit 8111dfd

Please sign in to comment.