Skip to content

Commit

Permalink
fix: update filesize import to use named export
Browse files Browse the repository at this point in the history
  • Loading branch information
milad-emami committed Nov 23, 2024
1 parent 410b78e commit 647aa98
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/FilePopoverContent/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import PropTypes from 'prop-types';

import { FormattedMessage } from '@edx/frontend-platform/i18n';
import filesize from 'filesize';
import { filesize } from 'filesize';

import messages from './messages';

Expand Down
6 changes: 4 additions & 2 deletions src/components/FilePopoverContent/index.test.jsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import React from 'react';
import { shallow } from '@edx/react-unit-test-utils';

import filesize from 'filesize';
import { filesize } from 'filesize';
import FilePopoverContent from '.';

jest.mock('filesize', () => (size) => `filesize(${size})`);
jest.mock('filesize', () => ({
filesize: (size) => `filesize(${size})`,
}));

describe('FilePopoverContent', () => {
describe('component', () => {
Expand Down

0 comments on commit 647aa98

Please sign in to comment.