Files
alexa-amundson-resume/tests/e2e/health.spec.js
Claude 20232bfd69 feat: add real Stripe integration, e2e tests, and Pi deployment
Replace documentation-only repo with working code:

- Stripe integration: webhook handler (8 event types), billing API
  (customers, checkout, payments, subscriptions, invoices)
- Express API server with health endpoint, structured logging
- E2E tests (Playwright): health, webhook signature verification,
  billing API validation
- Unit tests: webhook event handler coverage for all event types
- Pi deployment: deploy.sh (rsync + systemd), NGINX load balancer
  across Pi cluster, Docker support
- CI/CD: test workflow, Pi deploy workflow, updated auto-deploy
  and self-healing to run real tests before deploying
- Move resume docs to docs/ to separate code from documentation

https://claude.ai/code/session_01Mf5Pg82fV6BTRS9GnpV7nr
2026-03-04 09:00:51 +00:00

22 lines
726 B
JavaScript

const { test, expect } = require('@playwright/test');
const BASE_URL = process.env.BASE_URL || 'http://localhost:3000';
test.describe('Health Check E2E', () => {
test('GET /api/health returns 200 with status ok', async ({ request }) => {
const res = await request.get(`${BASE_URL}/api/health`);
expect(res.status()).toBe(200);
const body = await res.json();
expect(body.status).toBe('ok');
expect(body.service).toBe('blackroad-stripe');
expect(body.timestamp).toBeTruthy();
expect(body.uptime).toBeGreaterThan(0);
});
test('GET /nonexistent returns 404', async ({ request }) => {
const res = await request.get(`${BASE_URL}/nonexistent`);
expect(res.status()).toBe(404);
});
});