Skip to content

Commit

Permalink
chore: fix linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
arjunvegda committed Aug 2, 2024
1 parent b055650 commit 42fe42f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
16 changes: 8 additions & 8 deletions __tests__/devtools/TimeTravel.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,16 @@ describe('DevTools - TimeTravel', () => {
describe('Snapshot list', () => {
it('should render time travel without any errors', () => {
customRender(<DevTools isInitialOpen={true} />);
expect(screen.getByText('👻 Jōtai DevTools')).toBeInTheDocument(),
expect(screen.getByText('Time travel')).toBeInTheDocument();
expect(screen.getByText('👻 Jōtai DevTools')).toBeInTheDocument();
expect(screen.getByText('Time travel')).toBeInTheDocument();

fireEvent.click(screen.getByText('Time travel'));
expect(screen.getByPlaceholderText('Search')).toBeInTheDocument(),
expect(
screen.getByText(
'Select a snapshot from the left panel to view the details',
),
).toBeInTheDocument();
expect(screen.getByPlaceholderText('Search')).toBeInTheDocument();
expect(
screen.getByText(
'Select a snapshot from the left panel to view the details',
),
).toBeInTheDocument();
expect(screen.getByTestId('jotai-devtools-shell')).toMatchSnapshot();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,7 @@ export const getItemStringWithDiff = (
const previewContent = true;

if (nodeType === 'Object') {
// eslint-disable-next-line @typescript-eslint/ban-types
const keys = Object.keys(data as {});
const keys = Object.keys(data as object);
if (!previewContent) return keys.length ? '{…}' : '{}';

const str = keys
Expand Down

0 comments on commit 42fe42f

Please sign in to comment.