Rename vBoxStock test fixtures

This commit is contained in:
mfwadejr
2026-08-29 21:21:40 -04:00
committed by GitHub
parent 7daaf51e64
commit 01c25e7fc8
+1 -1
View File
@@ -6,7 +6,7 @@ import { tmpdir } from "node:os";
import { join } from "node:path"; import { join } from "node:path";
test("authentication, roles, inventory, sale, and restock", async t => { test("authentication, roles, inventory, sale, and restock", async t => {
const data=await mkdtemp(join(tmpdir(),"stockroom-")),port=31991; const data=await mkdtemp(join(tmpdir(),"vboxstock-")),port=31991;
const processHandle=spawn(process.execPath,["server.mjs"],{cwd:import.meta.dirname+"/..",env:{...process.env,DATA_DIR:data,PORT:String(port)}}); const processHandle=spawn(process.execPath,["server.mjs"],{cwd:import.meta.dirname+"/..",env:{...process.env,DATA_DIR:data,PORT:String(port)}});
t.after(()=>processHandle.kill()); t.after(()=>processHandle.kill());
await new Promise((resolve,reject)=>{processHandle.stdout.on("data",chunk=>String(chunk).includes("listening")&&resolve());processHandle.on("error",reject)}); await new Promise((resolve,reject)=>{processHandle.stdout.on("data",chunk=>String(chunk).includes("listening")&&resolve());processHandle.on("error",reject)});