Dev (#50)
* update * cleanup * fixing linting and tests errors * Refactor API Parameter Handling and Update Email Transport ✅ Updated API Route Parameters: - Changed parameter type from `{ id: string }` to `Promise<{ id: string }>` in PUT and DELETE methods for better async handling. ✅ Fixed Email Transport Creation: - Updated `nodemailer.createTransporter` to `nodemailer.createTransport` for correct transport configuration. ✅ Refactored AnalyticsDashboard Component: - Changed export from default to named export for better modularity. ✅ Enhanced Email Responder Toast: - Updated toast structure to include additional properties for better user feedback. 🎯 Overall Improvements: - Improved async handling in API routes. - Ensured correct usage of nodemailer. - Enhanced component exports and user notifications.
This commit is contained in:
@@ -18,7 +18,7 @@ afterAll(() => {
|
||||
|
||||
beforeEach(() => {
|
||||
nodemailermock.mock.reset();
|
||||
process.env.MY_EMAIL = 'test@dki.one';
|
||||
process.env.MY_EMAIL = 'test@dk0.dev';
|
||||
process.env.MY_PASSWORD = 'test-password';
|
||||
});
|
||||
|
||||
@@ -42,7 +42,7 @@ describe('POST /api/email', () => {
|
||||
|
||||
const sentEmails = nodemailermock.mock.getSentMail();
|
||||
expect(sentEmails.length).toBe(1);
|
||||
expect(sentEmails[0].to).toBe('contact@dki.one');
|
||||
expect(sentEmails[0].to).toBe('contact@dk0.dev');
|
||||
expect(sentEmails[0].text).toContain('Hello! This is a test message.');
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user