Skip to content

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
danetsao committed Feb 8, 2024
1 parent a564427 commit 45db672
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 18 deletions.
20 changes: 10 additions & 10 deletions src/components/Token/TokenCardToolbox.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ describe('Token card toolbox', () => {
{({ handleSubmit }) => (
<form onSubmit={handleSubmit}>
<TokenCardToolbox
fieldArrayName={'test'}
name={'test[1]'}
fieldArrayName="test"
name="test[1]"
index={1}
isLast
showLengthControl={false}
Expand Down Expand Up @@ -56,8 +56,8 @@ describe('Token card toolbox', () => {
{({ handleSubmit }) => (
<form onSubmit={handleSubmit}>
<TokenCardToolbox
fieldArrayName={'test'}
name={'test[1]'}
fieldArrayName="test"
name="test[1]"
index={1}
isLast={false}
showLengthControl={false}
Expand Down Expand Up @@ -95,8 +95,8 @@ describe('Token card toolbox', () => {
{({ handleSubmit }) => (
<form onSubmit={handleSubmit}>
<TokenCardToolbox
fieldArrayName={'test'}
name={'test[0]'}
fieldArrayName="test"
name="test[0"
index={0}
isLast={false}
showLengthControl={false}
Expand Down Expand Up @@ -130,8 +130,8 @@ describe('Token card toolbox', () => {
{({ handleSubmit }) => (
<form onSubmit={handleSubmit}>
<TokenCardToolbox
fieldArrayName={'test'}
name={'test[2]'}
fieldArrayName="test"
name="test[2"
index={2}
isLast
showLengthControl
Expand Down Expand Up @@ -163,8 +163,8 @@ describe('Token card toolbox', () => {
{({ handleSubmit }) => (
<form onSubmit={handleSubmit}>
<TokenCardToolbox
fieldArrayName={'test'}
name={'test[0]'}
fieldArrayName="test"
name="test[0]"
index={0}
isLast
showLengthControl
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useMonetaryOnBlur.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ it('Monetary onBlur works as expected on a field with nothing typed', async () =
await userEvent.tab();
screen.getByRole('spinbutton').blur();
await userEvent.click(screen.getByRole('button', { name: 'Submit' }));
waitFor (() => expect(submitter).toHaveBeenCalledWith({
waitFor(() => expect(submitter).toHaveBeenCalledWith({
test: '0.00',
}));
});
Expand Down
1 change: 0 additions & 1 deletion src/utils/WeekdayUtils.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { renderHook } from '@testing-library/react';
import { IntlShape } from 'react-intl';
import * as Weekdays from '../test/data/Weekdays';
import getIntl from '../test/util/getIntl';
Expand Down
8 changes: 2 additions & 6 deletions src/utils/guardNumber.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ describe('guardNumber function', () => {
['', TEST_FALLBACK],
[undefined, TEST_FALLBACK],
['a123', TEST_FALLBACK],
])('guardNumber(%s) = %s', (input, expected) =>
expect(guardNumber(input, TEST_FALLBACK)).toBe(expected)
);
])('guardNumber(%s) = %s', (input, expected) => expect(guardNumber(input, TEST_FALLBACK)).toBe(expected));

test('guardNumber custom beforeRound', () => {
const formatter = jest.fn((v) => v + 1);
Expand All @@ -31,7 +29,5 @@ describe('guardNumber function', () => {
['-1', 0],
['-1000.5', 0],
['', 0],
])('guardNumberPositive(%s) = %s', (input, expected) =>
expect(guardNumberPositive(input)).toBe(expected)
);
])('guardNumberPositive(%s) = %s', (input, expected) => expect(guardNumberPositive(input)).toBe(expected));
});

0 comments on commit 45db672

Please sign in to comment.