chore(development): add dev mode, update packages and test framework
This commit is contained in:
@@ -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();
|
||||
});
|
||||
|
||||
|
||||
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user