/
githubmirror
/
novu
Обзор
Документация
Войти
/
githubmirror
/
novu
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
next
libs/testing/src/test-server.service.ts
55 строк
915 B
Adam Chmara
chore(root): apply biome formatter & linter fixes NV-6436 (#8838)
31 июл 2025, 14:59
Не верифицирован
31 июл 2025, 14:59
855fb8f
Код
Авторство
О чём код?
export class TestServer { private app; getHttpServer() { return this.app.getHttpServer(); } getService(service) { return this.app.get(service); } async create(app) { this.app = app; } async teardown() { try { if (this.app) { await this.app.close(); } } catch (error) { console.error('Error when closing TestServer', error.message); } } } export const testServer = new TestServer(); export class WsTestServer { private app; getHttpServer() { return this.app.getHttpServer(); } getService(service) { return this.app.get(service); } async create(app) { this.app = app; } async teardown() { try { if (this.app) { await this.app.close(); } } catch (error) { console.error('Error when closing WsServer', error.message); } } } export const wsTestServer = new WsTestServer();