mirror of
https://github.com/Pandipipas/scoreko-electron-dev.git
synced 2026-06-06 05:32:06 +00:00
refactor: run NodeCG from lib/scoreko-dev for Node 24 migration
This commit is contained in:
@@ -35,7 +35,7 @@ function getBaseConfig(): AppRuntimeConfig {
|
||||
test("startNodeCG validates NodeCG installation before starting", async () => {
|
||||
const manager = createNodecgProcessManager({
|
||||
isDev: true,
|
||||
nodecgRootPath: "/fake/nodecg",
|
||||
nodecgRootPath: "/fake/scoreko-dev",
|
||||
nodecgBaseUrl: "http://127.0.0.1:9090",
|
||||
appConfig: getBaseConfig(),
|
||||
log: () => undefined,
|
||||
@@ -49,13 +49,13 @@ test("startNodeCG validates NodeCG installation before starting", async () => {
|
||||
|
||||
await assert.rejects(async () => {
|
||||
await manager.startNodecgProcess();
|
||||
}, /NodeCG folder does not exist/);
|
||||
}, /Scoreko app folder does not exist/);
|
||||
});
|
||||
|
||||
test("startNodeCG fails when there are no read/write permissions", async () => {
|
||||
const manager = createNodecgProcessManager({
|
||||
isDev: true,
|
||||
nodecgRootPath: "/fake/nodecg",
|
||||
nodecgRootPath: "/fake/scoreko-dev",
|
||||
nodecgBaseUrl: "http://127.0.0.1:9090",
|
||||
appConfig: getBaseConfig(),
|
||||
log: () => undefined,
|
||||
@@ -67,14 +67,14 @@ test("startNodeCG fails when there are no read/write permissions", async () => {
|
||||
|
||||
await assert.rejects(async () => {
|
||||
await manager.startNodecgProcess();
|
||||
}, /No read\/write permissions on NodeCG/);
|
||||
}, /No read\/write permissions on scoreko app folder/);
|
||||
});
|
||||
|
||||
test("waitForNodeCGReady resolves when endpoint returns 404", async () => {
|
||||
const child = new MockChildProcess(4321);
|
||||
const manager = createNodecgProcessManager({
|
||||
isDev: true,
|
||||
nodecgRootPath: "/fake/nodecg",
|
||||
nodecgRootPath: "/fake/scoreko-dev",
|
||||
nodecgBaseUrl: "http://127.0.0.1:9090",
|
||||
appConfig: getBaseConfig(),
|
||||
log: () => undefined,
|
||||
@@ -107,7 +107,7 @@ test("stopNodeCG sends SIGTERM and then SIGKILL if the process does not exit", a
|
||||
|
||||
const manager = createNodecgProcessManager({
|
||||
isDev: true,
|
||||
nodecgRootPath: "/fake/nodecg",
|
||||
nodecgRootPath: "/fake/scoreko-dev",
|
||||
nodecgBaseUrl: "http://127.0.0.1:9090",
|
||||
appConfig: getBaseConfig(),
|
||||
log: () => undefined,
|
||||
@@ -153,7 +153,7 @@ test("stopNodeCG reuses the same promise when invoked in parallel", async () =>
|
||||
|
||||
const manager = createNodecgProcessManager({
|
||||
isDev: true,
|
||||
nodecgRootPath: "/fake/nodecg",
|
||||
nodecgRootPath: "/fake/scoreko-dev",
|
||||
nodecgBaseUrl: "http://127.0.0.1:9090",
|
||||
appConfig: getBaseConfig(),
|
||||
log: () => undefined,
|
||||
@@ -186,7 +186,7 @@ test("stopNodeCG normalizes negative timeout to zero", async () => {
|
||||
|
||||
const manager = createNodecgProcessManager({
|
||||
isDev: true,
|
||||
nodecgRootPath: "/fake/nodecg",
|
||||
nodecgRootPath: "/fake/scoreko-dev",
|
||||
nodecgBaseUrl: "http://127.0.0.1:9090",
|
||||
appConfig: {
|
||||
...getBaseConfig(),
|
||||
@@ -222,7 +222,7 @@ test("stopNodeCG normalizes negative timeout to zero", async () => {
|
||||
test("startNodeCG fails if the port is already in use", async () => {
|
||||
const manager = createNodecgProcessManager({
|
||||
isDev: true,
|
||||
nodecgRootPath: "/fake/nodecg",
|
||||
nodecgRootPath: "/fake/scoreko-dev",
|
||||
nodecgBaseUrl: "http://127.0.0.1:9090",
|
||||
appConfig: getBaseConfig(),
|
||||
log: () => undefined,
|
||||
@@ -242,7 +242,7 @@ test("waitForNodeCGReady exposes diagnostics when NodeCG exits before readiness"
|
||||
const child = new MockChildProcess(4242);
|
||||
const manager = createNodecgProcessManager({
|
||||
isDev: true,
|
||||
nodecgRootPath: "/fake/nodecg",
|
||||
nodecgRootPath: "/fake/scoreko-dev",
|
||||
nodecgBaseUrl: "http://127.0.0.1:9090",
|
||||
appConfig: getBaseConfig(),
|
||||
log: () => undefined,
|
||||
@@ -275,7 +275,7 @@ test("waitForNodeCGReady exposes diagnostics when NodeCG exits before readiness"
|
||||
assert.ok(error instanceof Error);
|
||||
assert.match(error.message, /NodeCG exited before becoming ready/);
|
||||
assert.match(error.message, /Last recorded exit/);
|
||||
assert.match(error.message, /NodeCG path: \/fake\/nodecg/);
|
||||
assert.match(error.message, /NodeCG path: \/fake\/scoreko-dev/);
|
||||
return true;
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user