0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-03-22 08:58:11 +00:00
Files
homebrewery/tests/routes/static-pages.test.js
Víctor Losada Hernández 735c8cb917 fix static pages tests
2026-02-24 21:58:09 +01:00

32 lines
733 B
JavaScript

import supertest from 'supertest';
import createApp from '../../server/app.js';
let app;
let request;
beforeAll(async ()=>{
app = await createApp();
request = supertest.agent(app).set('X-Forwarded-Proto', 'https');
});
describe('Tests for static pages', ()=>{
it('Home page works', async ()=>{
await request.get('/').expect(200);
});
it('Home page legacy works', async ()=>{
await request.get('/legacy').expect(200);
});
it('Changelog page works', async ()=>{
await request.get('/changelog').expect(200);
});
it('FAQ page works', async ()=>{
await request.get('/faq').expect(200);
});
it('robots.txt works', async ()=>{
await request.get('/robots.txt').expect(200);
});
});