chore(development): add dev mode, update packages and test framework

This commit is contained in:
Sergo
2025-12-13 16:29:14 +02:00
parent c77eaf2968
commit d3b3b91523
12 changed files with 3955 additions and 1842 deletions

View File

@@ -2,6 +2,7 @@
import assert from 'assert';
import axios from 'axios';
import type { Server } from 'http';
import { describe, it, beforeAll, afterAll } from 'vitest';
import { app } from '../src/app';
const port = app.get('port');
@@ -10,11 +11,11 @@ const appUrl = `http://${app.get('host')}:${port}`;
describe('Feathers application tests', () => {
let server: Server;
before(async () => {
beforeAll(async () => {
server = await app.listen(port);
});
after(async () => {
afterAll(async () => {
await app.teardown();
});

View File

@@ -1,11 +1,12 @@
import assert from 'assert';
import fs from 'fs';
import path from 'path';
import { describe, it, beforeAll } from 'vitest';
describe('UI tests', () => {
let html: string;
before(async () => {
beforeAll(async () => {
// Load the HTML file
const htmlPath = path.join(__dirname, '../public/index.html');
html = fs.readFileSync(htmlPath, 'utf8');