diff --git a/node_modules/_app/factorioServer/index.spec.js b/node_modules/_app/factorioServer/index.spec.js index 2632118d..31087e81 100644 --- a/node_modules/_app/factorioServer/index.spec.js +++ b/node_modules/_app/factorioServer/index.spec.js @@ -57,17 +57,15 @@ describe("factorioServer/index.js", ()=>{ it("creates a map file as instanceDirectory/saves/map.zip", async ()=>{ let relativePath = __dirname.replace(appRootPath, "").substr(1); let server = new factorioServer({ - instanceDirectory: path.resolve(appRootPath+"", relativePath, "_testData_createMap"), + instanceDirectory: path.resolve(relativePath, "_testData_createMap"), instanceName: "Unit testing instance", }); await server.initialize(); - console.log(appRootPath+"") - console.log(relativePath) - console.log(path.resolve(appRootPath+"", relativePath, "_testData_createMap", "saves")) - let maps = fs.readdirSync(path.resolve(appRootPath+"", relativePath, "_testData_createMap", "saves")); + console.log("Relative path: "+relativePath) + let maps = fs.readdirSync(path.resolve(relativePath, "_testData_createMap", "saves")); assert.equal(maps.length, 0); await server.createMap(); - let maps2 = fs.readdirSync(path.resolve(appRootPath+"", relativePath, "_testData_createMap", "saves")); + let maps2 = fs.readdirSync(path.resolve(relativePath, "_testData_createMap", "saves")); assert(maps2.includes("map.zip")); server.deleteInstance();