mirror of
https://github.com/ahmadk953/tasko.git
synced 2025-05-01 11:19:34 +00:00
Added Basic Darkmode and Fixed Small Bugs
This commit is contained in:
parent
aacca3d141
commit
94fb5c7eb1
42 changed files with 593 additions and 72 deletions
|
@ -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
40
__tests__/utils.test.ts
Normal 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');
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue