Separate the internal API and nginx ports, align browser BDD fixtures with tenant and Go Loose requirements, and correct the invitation outcome interaction order. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
29 lines
739 B
JavaScript
29 lines
739 B
JavaScript
import { spawn } from "node:child_process";
|
|
import http from "node:http";
|
|
|
|
const authorizationServer = http.createServer((request, response) => {
|
|
response.setHeader("Content-Type", "application/json");
|
|
response.end(
|
|
JSON.stringify({
|
|
allowed: true,
|
|
tenant_slug: "ypto",
|
|
application_slug: "guess",
|
|
api_key_name: "bdd",
|
|
}),
|
|
);
|
|
});
|
|
|
|
authorizationServer.listen(18081, "127.0.0.1", () => {
|
|
const cucumber = spawn("cucumber-js", ["--config", "cucumber.mjs"], {
|
|
stdio: "inherit",
|
|
});
|
|
cucumber.on("exit", (code, signal) => {
|
|
authorizationServer.close(() => {
|
|
if (signal) {
|
|
process.kill(process.pid, signal);
|
|
} else {
|
|
process.exit(code ?? 1);
|
|
}
|
|
});
|
|
});
|
|
});
|