My-Weekly-ToDo-List/test-api.js
mARTin c82572935c feat: dark mode color adjustment, multi-source quotes, UI text wrapping, and versioning rules
- Add dark mode color adjustment helper for category colors
- Support multiple motivational quote source URLs
- Fix text wrapping for tasks/events to prevent horizontal overflow
- Improve someday list item layout for long text
- Add CLAUDE.md with semantic versioning and git workflow rules
- Update test/doc URLs and planning docs

v1.1.0

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 23:33:25 +01:00

42 lines
1.1 KiB
JavaScript

// Test script to verify the signup API endpoint works
// Run with: node test-api.js
const fetch = require('node-fetch');
async function testSignupApi() {
console.log('Testing signup API endpoint...');
try {
const response = await fetch('http://localhost:3001/api/auth/signup', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
email: 'test@example.com',
password: 'testpassword'
})
});
console.log('Status:', response.status);
console.log('Headers:', response.headers.raw());
const contentType = response.headers.get('content-type');
console.log('Content-Type:', contentType);
if (contentType && contentType.includes('application/json')) {
const data = await response.json();
console.log('JSON Response:', data);
} else {
const text = await response.text();
console.log('Non-JSON Response (likely HTML):');
console.log(text.substring(0, 500) + '...');
}
} catch (error) {
console.error('Error testing API:', error);
}
}
// Run the test
testSignupApi();