Skip to content

Commit

Permalink
Simplify assert
Browse files Browse the repository at this point in the history
  • Loading branch information
Nina Ciocanu committed Dec 30, 2023
1 parent 7033c05 commit 4267145
Showing 1 changed file with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,11 @@ describe("createMediaRequest", () => {
it("should call createRequest with correct parameters", () => {
const mediaRequestPayload = {}; // replace with valid payload
const action = "testAction";
const expectedParams = {
payload: mediaRequestPayload,
edgeSubPath: "/va",
getAction: jasmine.any(Function),
getUseSendBeacon: jasmine.any(Function)
};

const edgeSubPath = "/va";
const result = createMediaRequest({ mediaRequestPayload, action });

expect(result.getAction()).toEqual(action);
expect(result.getEdgeSubPath()).toEqual(expectedParams.edgeSubPath);
expect(result.getEdgeSubPath()).toEqual(edgeSubPath);
expect(result.getUseSendBeacon()).toEqual(false);
});
});

0 comments on commit 4267145

Please sign in to comment.