chore(frontend): improve code formatting for readability
Standardize multiline formatting across components, tests, and API hooks for better consistency and clarity: - Adjusted function and object property indentation. - Updated tests and components to align with clean coding practices.
This commit is contained in:
@@ -113,7 +113,9 @@ describe('RecentProjects', () => {
|
||||
});
|
||||
|
||||
it('applies custom className', () => {
|
||||
const { container } = render(<RecentProjects projects={mockProjects} className="custom-class" />);
|
||||
const { container } = render(
|
||||
<RecentProjects projects={mockProjects} className="custom-class" />
|
||||
);
|
||||
|
||||
expect(container.firstChild).toHaveClass('custom-class');
|
||||
});
|
||||
|
||||
@@ -27,7 +27,14 @@ describe('WelcomeHeader', () => {
|
||||
|
||||
it('displays greeting with user first name', () => {
|
||||
mockUseAuth.mockReturnValue({
|
||||
user: { id: '1', email: 'john@example.com', first_name: 'John', is_active: true, is_superuser: false, created_at: '' },
|
||||
user: {
|
||||
id: '1',
|
||||
email: 'john@example.com',
|
||||
first_name: 'John',
|
||||
is_active: true,
|
||||
is_superuser: false,
|
||||
created_at: '',
|
||||
},
|
||||
isAuthenticated: true,
|
||||
isLoading: false,
|
||||
error: null,
|
||||
@@ -44,7 +51,14 @@ describe('WelcomeHeader', () => {
|
||||
|
||||
it('falls back to email prefix when first_name is empty', () => {
|
||||
mockUseAuth.mockReturnValue({
|
||||
user: { id: '1', email: 'jane@example.com', first_name: '', is_active: true, is_superuser: false, created_at: '' },
|
||||
user: {
|
||||
id: '1',
|
||||
email: 'jane@example.com',
|
||||
first_name: '',
|
||||
is_active: true,
|
||||
is_superuser: false,
|
||||
created_at: '',
|
||||
},
|
||||
isAuthenticated: true,
|
||||
isLoading: false,
|
||||
error: null,
|
||||
@@ -78,7 +92,14 @@ describe('WelcomeHeader', () => {
|
||||
|
||||
it('displays subtitle text', () => {
|
||||
mockUseAuth.mockReturnValue({
|
||||
user: { id: '1', email: 'test@example.com', first_name: 'Test', is_active: true, is_superuser: false, created_at: '' },
|
||||
user: {
|
||||
id: '1',
|
||||
email: 'test@example.com',
|
||||
first_name: 'Test',
|
||||
is_active: true,
|
||||
is_superuser: false,
|
||||
created_at: '',
|
||||
},
|
||||
isAuthenticated: true,
|
||||
isLoading: false,
|
||||
error: null,
|
||||
@@ -95,7 +116,14 @@ describe('WelcomeHeader', () => {
|
||||
|
||||
it('displays Create Project button', () => {
|
||||
mockUseAuth.mockReturnValue({
|
||||
user: { id: '1', email: 'test@example.com', first_name: 'Test', is_active: true, is_superuser: false, created_at: '' },
|
||||
user: {
|
||||
id: '1',
|
||||
email: 'test@example.com',
|
||||
first_name: 'Test',
|
||||
is_active: true,
|
||||
is_superuser: false,
|
||||
created_at: '',
|
||||
},
|
||||
isAuthenticated: true,
|
||||
isLoading: false,
|
||||
error: null,
|
||||
|
||||
Reference in New Issue
Block a user