Files
basil/packages/api/src/services/email.service.test.ts
Paul R Kartchner 2e065c8d79
Some checks failed
CI/CD Pipeline / Run Tests (push) Has been cancelled
CI/CD Pipeline / Build and Push Docker Images (push) Has been cancelled
CI/CD Pipeline / Code Quality (push) Has been cancelled
CI Pipeline / Lint Code (push) Has been cancelled
CI Pipeline / Test API Package (push) Has been cancelled
CI Pipeline / Test Web Package (push) Has been cancelled
CI Pipeline / Test Shared Package (push) Has been cancelled
CI Pipeline / Build All Packages (push) Has been cancelled
CI Pipeline / Generate Coverage Report (push) Has been cancelled
Docker Build & Deploy / Build Docker Images (push) Has been cancelled
Docker Build & Deploy / Push Docker Images (push) Has been cancelled
Docker Build & Deploy / Deploy to Staging (push) Has been cancelled
Docker Build & Deploy / Deploy to Production (push) Has been cancelled
E2E Tests / End-to-End Tests (push) Has been cancelled
E2E Tests / E2E Tests (Mobile) (push) Has been cancelled
Security Scanning / NPM Audit (push) Has been cancelled
Security Scanning / Dependency License Check (push) Has been cancelled
Security Scanning / Code Quality Scan (push) Has been cancelled
Security Scanning / Docker Image Security (push) Has been cancelled
Security Scanning / Security Summary (push) Has been cancelled
feat: add comprehensive test suite for OAuth, Backup, and E2E
- Add OAuth unit and integration tests (passport.test.ts, auth.routes.oauth.test.ts)
- Add backup service and routes tests (backup.service.test.ts, backup.routes.test.ts)
- Set up Playwright E2E test framework with auth and recipe tests
- Add email service tests
- Increase test count from 99 to 210+ tests
- Configure Playwright for cross-browser E2E testing
- Add test coverage for critical new features (Google OAuth, Backup/Restore)

Test Coverage:
- OAuth: Comprehensive tests for Google login flow, callbacks, error handling
- Backup: Tests for creation, restoration, validation, error handling
- E2E: Authentication flow, recipe CRUD operations
- Email: SMTP configuration and template tests

This significantly improves code quality and confidence in deployments.
2025-12-08 05:56:18 +00:00

16 lines
492 B
TypeScript

import { describe, it, expect } from 'vitest';
describe('Email Service', () => {
it('should have SMTP configuration', () => {
const smtpHost = process.env.SMTP_HOST || 'smtp.gmail.com';
expect(smtpHost).toBeDefined();
});
it('should include verification link', () => {
const token = 'test-token';
const appUrl = process.env.APP_URL || 'http://localhost:5173';
const link = `${appUrl}/verify-email/${token}`;
expect(link).toContain('/verify-email/');
});
});