Files
Leviathan/test/routes/toplevel.test.js
Gregory Ballantine cf4641c8fb
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Added more unit tests
2025-08-19 19:35:55 -04:00

23 lines
608 B
JavaScript

const request = require('supertest');
const { expect } = require('chai');
const app = require('../../src/app');
describe('GET /', () => {
beforeEach(async () => {
const res = await request(app).get('/');
this.res = res;
});
it('Dashboard should return a 200 status', async () => {
expect(this.res.status).to.equal(200);
});
it('Dashboard should return an HTML response', async () => {
expect(this.res.headers['content-type']).match(/text\/html/);
});
it('Dashboard should contain "Leviathan" in body', async() => {
expect(this.res.text).contains('Leviathan');
});
});