test: fix gateway test lint

This commit is contained in:
Peter Steinberger
2026-01-18 07:44:14 +00:00
parent ca350fc66c
commit 49bd2d96fa
2 changed files with 7 additions and 7 deletions

View File

@@ -30,7 +30,7 @@ describe("gateway server channels", () => {
vi.stubEnv("TELEGRAM_BOT_TOKEN", undefined);
const result = await startServerWithClient();
servers.push(result);
const { server, ws } = result;
const { ws } = result;
await connectOk(ws);
const res = await rpcReq<{
@@ -61,7 +61,7 @@ describe("gateway server channels", () => {
test("channels.logout reports no session when missing", async () => {
const result = await startServerWithClient();
servers.push(result);
const { server, ws } = result;
const { ws } = result;
await connectOk(ws);
const res = await rpcReq<{ cleared?: boolean; channel?: string }>(ws, "channels.logout", {
@@ -86,7 +86,7 @@ describe("gateway server channels", () => {
const result = await startServerWithClient();
servers.push(result);
const { server, ws } = result;
const { ws } = result;
await connectOk(ws);
const res = await rpcReq<{

View File

@@ -1,7 +1,7 @@
import fs from "node:fs/promises";
import os from "node:os";
import path from "node:path";
import { afterEach, describe, expect, it, vi } from "vitest";
import { afterEach, describe, expect, it } from "vitest";
import {
connectOk,
@@ -31,7 +31,7 @@ describe("gateway config.apply", () => {
it("writes config, stores sentinel, and schedules restart", async () => {
const result = await startServerWithClient();
servers.push(result);
const { server, ws } = result;
const { ws } = result;
await connectOk(ws);
const id = "req-1";
@@ -63,7 +63,7 @@ describe("gateway config.apply", () => {
const raw = await fs.readFile(sentinelPath, "utf-8");
const parsed = JSON.parse(raw) as { payload?: { kind?: string } };
expect(parsed.payload?.kind).toBe("config-apply");
} catch (err) {
} catch {
// File may not exist if signal delivery is mocked, verify response was ok instead
expect(res.ok).toBe(true);
}
@@ -72,7 +72,7 @@ describe("gateway config.apply", () => {
it("rejects invalid raw config", async () => {
const result = await startServerWithClient();
servers.push(result);
const { server, ws } = result;
const { ws } = result;
await connectOk(ws);
const id = "req-2";