Add comprehensive workflow commands for AI-assisted development: - Claude commands: analyze, clarify, plan - Kilocode workflows: full feature development lifecycle - Opencode commands: specification and implementation workflows - Roo MCP configuration for tool integration Update .gitignore to exclude .astro build cache directories. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
23 lines
693 B
TypeScript
23 lines
693 B
TypeScript
import { describe, it, expect } from 'vitest';
|
|
import { authService } from '../src/services/auth';
|
|
|
|
describe('Auth Service', () => {
|
|
it('should login user', async () => {
|
|
// Mock fetch
|
|
global.fetch = vi.fn(() =>
|
|
Promise.resolve({
|
|
ok: true,
|
|
json: () => Promise.resolve({ user: { id: 1, email: 'test@example.com' }, token: 'token' })
|
|
})
|
|
);
|
|
|
|
const result = await authService.login('test@example.com', 'password');
|
|
expect(result.user.email).toBe('test@example.com');
|
|
});
|
|
|
|
it('should get current user', async () => {
|
|
authService.token = 'token';
|
|
const user = await authService.getCurrentUser();
|
|
expect(user).toBeDefined();
|
|
});
|
|
}); |