mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-13 23:14:53 +09:00
,
This commit is contained in:
1 parent
dfa5d9ad16
commit
d9d8905d02
1 file changed
+4
-6
+4
-6
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user