Added Basic Darkmode and Fixed Small Bugs

This commit is contained in:
Ahmad 2025-01-13 19:12:06 -05:00
parent aacca3d141
commit 94fb5c7eb1
No known key found for this signature in database
GPG key ID: 8FD8A93530D182BF
42 changed files with 593 additions and 72 deletions

View file

@ -14,7 +14,7 @@ exports[`Home renders homepage unchanged 1`] = `
No 1 task management app
</div>
<h1
class="mb-6 text-center text-neutral-800 ~/md:~text-3xl/6xl"
class="mb-6 text-center text-neutral-800 ~/md:~text-3xl/6xl dark:text-neutral-100"
>
Tasko helps teams move
</h1>

40
__tests__/utils.test.ts Normal file
View file

@ -0,0 +1,40 @@
import { cn, absoluteUrl } from '@/lib/utils';
describe('absoluteUrl', () => {
const originalEnv = process.env;
beforeEach(() => {
process.env = {
...originalEnv,
NEXT_PUBLIC_APP_URL: 'https://example.com',
};
});
afterEach(() => {
process.env = originalEnv;
});
it('should return the correct absolute URL', () => {
const pathname = '/test';
expect(absoluteUrl(pathname)).toBe('https://example.com/test');
});
it('should handle empty pathname', () => {
const pathname = '';
expect(absoluteUrl(pathname)).toBe('https://example.com');
});
});
describe('cn', () => {
it('should merge multiple class names', () => {
expect(cn('class1', 'class2')).toBe('class1 class2');
});
it('should handle conditional class names', () => {
const isActive = true;
expect(cn('base', isActive && 'active')).toBe('base active');
const isDisabled = false;
expect(cn('base', isDisabled && 'disabled')).toBe('base');
});
});