Skip to content

Commit f0bc4f8

Browse files
committed
test: use CRC32 as default in flexibleChecksumsMiddleware.spec.ts
1 parent d7c329a commit f0bc4f8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/middleware-flexible-checksums/src/flexibleChecksumsMiddleware.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ describe(flexibleChecksumsMiddleware.name, () => {
4545
mockNext.mockResolvedValueOnce(mockResult);
4646
const { isInstance } = HttpRequest;
4747
(isInstance as unknown as any).mockReturnValue(true);
48-
vi.mocked(getChecksumAlgorithmForRequest).mockReturnValue(ChecksumAlgorithm.MD5);
48+
vi.mocked(getChecksumAlgorithmForRequest).mockReturnValue(ChecksumAlgorithm.CRC32);
4949
vi.mocked(getChecksumLocationName).mockReturnValue(mockChecksumLocationName);
5050
vi.mocked(hasHeader).mockReturnValue(true);
5151
vi.mocked(isStreaming).mockReturnValue(false);
@@ -88,8 +88,8 @@ describe(flexibleChecksumsMiddleware.name, () => {
8888
request: { ...mockRequest, headers: mockHeadersWithChecksumHeader },
8989
};
9090
await handler(mockArgsWithChecksumHeader);
91-
expect(getChecksumLocationName).toHaveBeenCalledWith(ChecksumAlgorithm.MD5);
92-
expect(selectChecksumAlgorithmFunction).toHaveBeenCalledWith(ChecksumAlgorithm.MD5, mockConfig);
91+
expect(getChecksumLocationName).toHaveBeenCalledWith(ChecksumAlgorithm.CRC32);
92+
expect(selectChecksumAlgorithmFunction).toHaveBeenCalledWith(ChecksumAlgorithm.CRC32, mockConfig);
9393
expect(mockNext).toHaveBeenCalledWith(mockArgsWithChecksumHeader);
9494
expect(hasHeader).toHaveBeenCalledWith(mockChecksumLocationName, mockHeadersWithChecksumHeader);
9595
});

0 commit comments

Comments
 (0)