feat: initial tictactoe web app with CI/CD pipeline
Some checks failed
homelab-k8s-services/tictactoe/pipeline/head There was a failure building this commit
Some checks failed
homelab-k8s-services/tictactoe/pipeline/head There was a failure building this commit
- Express app serving vanilla JS 2-player TicTacToe game - Dockerfile (multi-stage node:18-slim) - Jenkinsfile (K8s pod: test → Harbor push → Helm bump → Gitea push) - Helm chart v1.0.0 with HTTPRoute for tictactoe.fireflylab.local Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
16
test/app.test.js
Normal file
16
test/app.test.js
Normal file
@@ -0,0 +1,16 @@
|
||||
const request = require('supertest');
|
||||
const app = require('../index');
|
||||
|
||||
describe('TicTacToe App', () => {
|
||||
it('GET / returns HTML', async () => {
|
||||
const res = await request(app).get('/');
|
||||
expect(res.statusCode).toBe(200);
|
||||
expect(res.headers['content-type']).toMatch(/html/);
|
||||
});
|
||||
|
||||
it('GET /health returns OK', async () => {
|
||||
const res = await request(app).get('/health');
|
||||
expect(res.statusCode).toBe(200);
|
||||
expect(res.text).toBe('OK');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user