forked from chainable-dev/the-front
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: Update eslint configuration and remove unused code
- Loading branch information
Showing
5 changed files
with
20 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,13 @@ | ||
module.exports = { | ||
extends: [ | ||
'eslint:recommended', | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:react/recommended', | ||
'plugin:react-hooks/recommended', | ||
'next/core-web-vitals', | ||
'plugin:@typescript-eslint/recommended', | ||
], | ||
parser: '@typescript-eslint/parser', | ||
plugins: ['@typescript-eslint', 'react'], | ||
plugins: ['@typescript-eslint'], | ||
root: true, | ||
env: { | ||
node: true, | ||
browser: true, | ||
es6: true, | ||
}, | ||
settings: { | ||
react: { | ||
version: 'detect', | ||
}, | ||
}, | ||
rules: { | ||
// Add any custom rules here | ||
"jsx-a11y/anchor-is-valid": "off" | ||
|
||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,6 @@ | ||
import React from 'react'; | ||
import { render, screen, fireEvent } from '@testing-library/react'; | ||
import DashboardPage from '@/app/dashboard/page'; | ||
import Notification from '@/components/Notification'; // Corrected casing | ||
import Notification from '@/components/Notification'; | ||
|
||
// Mock ResizeObserver | ||
global.ResizeObserver = class { | ||
observe() {} | ||
unobserve() {} | ||
disconnect() {} | ||
}; | ||
|
||
// Mock the Notification component | ||
jest.mock('@/components/Notification', () => ({ // Corrected casing | ||
__esModule: true, | ||
default: ({ message, type, onClose }: any) => ( | ||
<div data-testid="notification" className={`notification-${type}`}> | ||
{message} | ||
<button onClick={onClose}>Close</button> | ||
</div> | ||
), | ||
})); | ||
|
||
describe('DashboardPage', () => { | ||
|
||
it('renders the dashboard after loading', async () => { | ||
jest.useFakeTimers(); | ||
render(<DashboardPage />); | ||
|
||
// Fast-forward the timer | ||
jest.runAllTimers(); | ||
|
||
|
||
expect(await screen.findByText('Dashboard')).toBeInTheDocument(); | ||
}); | ||
|
||
}); | ||
// Add your test cases here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.