import { beforeEach, describe, test } from 'vitest'; import supertest from 'supertest'; import app from '../main.js'; const request = supertest(app); describe('Root handlers tests', function() { describe('When not logged in', function() { test('GET /', async function() { await request.get('/').expect('Content-Type', /text\/plain/).expect(302, /Redirecting to \/login$/); }); test('GET /login', async function() { await request.get('/login').expect('Content-Type', /text\/html/).expect(200, /