Skip to content

Commit

Permalink
chore: update dependencies (#159)
Browse files Browse the repository at this point in the history
* chore: update jotai

* chore: update dependencies for non-storybook modules

* chore: update storybook

* chore: fix linting errors

* chore: remove deprecated command from husky
  • Loading branch information
arjunvegda authored Aug 6, 2024
1 parent 609bd5a commit 55a97e2
Show file tree
Hide file tree
Showing 24 changed files with 2,020 additions and 14,272 deletions.
3 changes: 0 additions & 3 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

pnpm commitlint --edit $1

10 changes: 1 addition & 9 deletions __tests__/devtools/AtomViewer.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,10 @@ import { act, render, screen, waitFor } from '@testing-library/react';
import { userEvent } from '@testing-library/user-event';
import * as stringifyModule from 'javascript-stringify';
import { Provider, useAtomValue } from 'jotai';

Check warning on line 5 in __tests__/devtools/AtomViewer.test.tsx

View workflow job for this annotation

GitHub Actions / build

'Provider' is defined but never used. Allowed unused vars must match /^_/u
import { getDefaultStore } from 'jotai/experimental';
import { atom } from 'jotai/vanilla';
import { DevTools } from 'jotai-devtools';
import { AnyAtom } from 'src/types';
import { customRender as customTestRender } from '../custom-render';

const customRender = (ui: React.ReactElement) =>
customTestRender(ui, {
wrapper: ({ children }) => (
<Provider store={getDefaultStore()}>{children}</Provider>
),
});
import { customRender } from '../custom-render';

const BasicAtomsWithDevTools = () => {
// Create atoms inside the component so that they are recreated for each test
Expand Down
28 changes: 10 additions & 18 deletions __tests__/devtools/TimeTravel.test.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
import React, { useMemo } from 'react';
import { act, fireEvent, screen, waitFor } from '@testing-library/react';
import { userEvent } from '@testing-library/user-event';
import { Provider, atom, useAtomValue, useSetAtom } from 'jotai';
import { getDefaultStore } from 'jotai/experimental';
import { atom, useAtomValue, useSetAtom } from 'jotai';
import { DevTools, DevToolsProps } from 'jotai-devtools';
import { customRender as customTestRender } from '../custom-render';

const customRender = (ui: React.ReactElement) =>
customTestRender(ui, {
wrapper: ({ children }) => (
<Provider store={getDefaultStore()}>{children}</Provider>
),
});
import { customRender } from '../custom-render';

const BasicAtomsWithDevTools = (props: DevToolsProps) => {
// Create atoms inside the component so that they are recreated for each test
Expand Down Expand Up @@ -58,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
12 changes: 2 additions & 10 deletions __tests__/devtools/basic.test.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
import React, { useMemo } from 'react';
import { act, fireEvent, screen, waitFor } from '@testing-library/react';
import { userEvent } from '@testing-library/user-event';
import { Provider, atom, useAtom } from 'jotai';
import { getDefaultStore } from 'jotai/experimental';
import { atom, useAtom } from 'jotai';
import { DevTools } from 'jotai-devtools';
import { customRender as customTestRender } from '../custom-render';

const customRender = (ui: React.ReactElement) =>
customTestRender(ui, {
wrapper: ({ children }) => (
<Provider store={getDefaultStore()}>{children}</Provider>
),
});
import { customRender } from '../custom-render';

describe('DevTools - basic', () => {
it('should render the trigger button', () => {
Expand Down
Loading

0 comments on commit 55a97e2

Please sign in to comment.