Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
mj12albert committed Oct 20, 2023
1 parent 452fa87 commit 1797c40
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
9 changes: 4 additions & 5 deletions packages/mui-material-next/src/InputBase/InputBase.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,8 @@ describe('<InputBase />', () => {
});

it('should inject onBlur and onFocus', () => {
let injectedProps: any = {};
let injectedProps: Record<string, unknown> = {};

const MyInputBase = React.forwardRef(function MyInputBase(
props: { ownerState: InputBaseOwnerState } & Record<string, unknown>,
ref: React.ForwardedRef<HTMLInputElement>,
Expand All @@ -259,10 +260,8 @@ describe('<InputBase />', () => {

render(<InputBase inputComponent={MyInputBase} />);

if (injectedProps) {
expect(typeof injectedProps.onBlur).to.equal('function');
expect(typeof injectedProps.onFocus).to.equal('function');
}
expect(typeof injectedProps.onBlur).to.equal('function');
expect(typeof injectedProps.onFocus).to.equal('function');
});

describe('target mock implementations', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/mui-material-next/src/InputBase/InputBase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ const InputBase = React.forwardRef(function InputBase<
const onFilled = muiFormControl && muiFormControl.onFilled;
const onEmpty = muiFormControl && muiFormControl.onEmpty;

// TODO: needs material-next/Outlined|FilledInput
// TODO: needs material-next/OutlinedInput
const checkDirty = React.useCallback(
(obj: any) => {
if (isFilled(obj)) {
Expand Down

0 comments on commit 1797c40

Please sign in to comment.