Skip to content

Commit

Permalink
Clean redundant comments
Browse files Browse the repository at this point in the history
  • Loading branch information
danburonline committed Dec 6, 2023
1 parent a9811cf commit 54644c4
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/shared/utils/__tests__/download.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,16 @@ jest.mock('../../../utils/contentTypes', () => ({
}));

describe('download function', () => {
// Mocks
const mockCreateObjectURL = jest.fn();
const mockRevokeObjectURL = jest.fn();

beforeAll(() => {
// Mock Blob
globalThis.Blob = jest.fn(() => ({})) as any;

// Mock URL.createObjectURL and URL.revokeObjectURL
globalThis.URL.createObjectURL = mockCreateObjectURL;
globalThis.URL.revokeObjectURL = mockRevokeObjectURL;

// Mock fileExtensionFromResourceEncoding
(fileExtensionFromResourceEncoding as jest.Mock).mockImplementation(
(mediaType: string) => {
if (mediaType === 'application/json') {
Expand All @@ -31,7 +28,6 @@ describe('download function', () => {
});

beforeEach(() => {
// Reset mocks before each test
mockCreateObjectURL.mockReset();
mockRevokeObjectURL.mockReset();
});
Expand Down

0 comments on commit 54644c4

Please sign in to comment.