mirror of
https://github.com/hanzoai/bot-railway-template.git
synced 2026-10-30 18:46:40 +00:00
12 lines
437 B
JavaScript
12 lines
437 B
JavaScript
import test from "node:test";
|
|
import assert from "node:assert/strict";
|
|
import fs from "node:fs";
|
|
|
|
test("reset handler stops gateway before deleting config", () => {
|
|
const src = fs.readFileSync(new URL("../src/server.js", import.meta.url), "utf8");
|
|
const idx = src.indexOf('app.post("/setup/api/reset"');
|
|
assert.ok(idx >= 0);
|
|
const window = src.slice(idx, idx + 900);
|
|
assert.match(window, /gatewayProc\.kill\("SIGTERM"\)/);
|
|
});
|