Skip to content

Commit 7f429d2

Browse files
Apply suggestions from code review
Co-authored-by: Caner Akdas <canerakdas@gmail.com> Signed-off-by: Aviv Keller <me@aviv.sh>
1 parent 977a7b6 commit 7f429d2

File tree

13 files changed

+32
-18
lines changed

13 files changed

+32
-18
lines changed

apps/site/components/Blog/BlogPostCard/__tests__/index.test.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
import { render, screen } from '@testing-library/react';
21
import { describe, it } from 'node:test';
32
import assert from 'node:assert/strict';
3+
4+
import { render, screen } from '@testing-library/react';
5+
46
import { isVisible } from '../../../../../../tests/utilities.mjs';
57

68
import BlogPostCard from '@/components/Blog/BlogPostCard';

apps/site/hooks/react-client/__tests__/useClientContext.test.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { renderHook } from '@testing-library/react';
22

3-
import useClientContext from '@/hooks/react-client/useClientContext';
4-
import { MatterContext } from '@/providers/matterProvider';
5-
63
import { describe, it } from 'node:test';
74
import assert from 'node:assert/strict';
85

6+
import useClientContext from '@/hooks/react-client/useClientContext';
7+
import { MatterContext } from '@/providers/matterProvider';
8+
99
describe('useClientContext', () => {
1010
it('should return client context values', () => {
1111
const mockContextValue = {

apps/site/hooks/react-client/__tests__/useCopyToClipboard.test.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import { render, fireEvent, screen } from '@testing-library/react';
21
import { describe, it } from 'node:test';
32
import assert from 'node:assert/strict';
43
import { setTimeout } from 'node:timers/promises';
54

5+
import { render, fireEvent, screen } from '@testing-library/react';
6+
67
import useCopyToClipboard from '@/hooks/react-client/useCopyToClipboard';
78

89
navigator.clipboard = { writeText: () => {} };

apps/site/hooks/react-client/__tests__/useNotification.test.jsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import { render } from '@testing-library/react';
22

3-
import useNotification from '@/hooks/react-client/useNotification';
4-
import { NotificationProvider } from '@/providers/notificationProvider';
53
import { describe, it } from 'node:test';
64
import assert from 'node:assert/strict';
75

6+
import useNotification from '@/hooks/react-client/useNotification';
7+
import { NotificationProvider } from '@/providers/notificationProvider';
8+
89
describe('useNotification', () => {
910
it('should return the notification dispatch function', () => {
1011
// Arrange

apps/site/providers/__tests__/navigationStateProvider.test.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import { render } from '@testing-library/react';
21
import { describe, it } from 'node:test';
32
import assert from 'node:assert/strict';
43

4+
import { render } from '@testing-library/react';
5+
56
import { NavigationStateProvider } from '@/providers/navigationStateProvider';
67

78
describe('NavigationStateProvider', () => {

apps/site/providers/__tests__/notificationProvider.test.jsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import { render, act, waitFor } from '@testing-library/react';
2-
import userEvent from '@testing-library/user-event';
31
import { describe, it } from 'node:test';
42
import assert from 'node:assert/strict';
53

4+
import { render, act, waitFor } from '@testing-library/react';
5+
import userEvent from '@testing-library/user-event';
6+
67
import {
78
NotificationProvider,
89
NotificationDispatch,

apps/site/providers/__tests__/themeProvider.test.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import { render } from '@testing-library/react';
21
import { describe, it } from 'node:test';
32
import assert from 'node:assert/strict';
43

4+
import { render } from '@testing-library/react';
5+
56
describe('ThemeProvider', () => {
67
it('renders NextThemeProvider with the correct props', async t => {
78
const mockFn = t.mock.fn(

apps/site/tests/setup.mjs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import '../../../tests/setup.mjs';
21
import { register } from 'node:module';
32

3+
import '../../../tests/setup.mjs';
4+
45
register('./loader.mjs', import.meta.url);

packages/ui-components/Common/BaseActiveLink/__tests__/index.test.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import { render, screen } from '@testing-library/react';
21
import { describe, it } from 'node:test';
32
import assert from 'node:assert/strict';
43

4+
import { render, screen } from '@testing-library/react';
5+
56
import ActiveLink from '..';
67

78
describe('ActiveLink', () => {

packages/ui-components/Common/BasePagination/PaginationListItem/__tests__/index.test.jsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
import { render, screen } from '@testing-library/react';
2-
import { isVisible } from '../../../../../../tests/utilities.mjs';
31
import { describe, it } from 'node:test';
42
import assert from 'node:assert/strict';
53

4+
import { render, screen } from '@testing-library/react';
5+
6+
import { isVisible } from '../../../../../../tests/utilities.mjs';
7+
68
import PaginationListItem from '@node-core/ui-components/Common/BasePagination/PaginationListItem';
79

810
function renderPaginationListItem({

0 commit comments

Comments
 (0)