fix: improve assimp version output and unit test
This commit is contained in:
parent
56971d68c4
commit
104c4af782
|
|
@ -121,7 +121,8 @@ if (process.env.NODE_ENV === "production") {
|
|||
}
|
||||
|
||||
if (stdout) {
|
||||
console.log(`assimp ${stdout.split("\n")[5]}`);
|
||||
const firstLines = (stdout || "").split("\n");
|
||||
console.log(`assimp ${firstLines[5] || firstLines[0] || ""}`);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ mock.module("node:child_process", () => ({
|
|||
|
||||
// assimp's real output is multi-line; the source reads line index 5.
|
||||
if (cmd.startsWith("assimp")) {
|
||||
cb(null, "l1\nl2\nl3\nl4\nl5\nassimp v1.0.0\n");
|
||||
cb(null, "l1\nl2\nl3\nl4\nl5\nVersion 1.0.0 (GIT commit abc123)\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue