Error message when started without instanceName

And some test coverage
This commit is contained in:
Danielv123 committed 2017-06-20 20:05:54 +02:00
1 parent e6da33582c
commit 5de0b6319c
3 files changed
+6 -1

No files matched your search

+4
View File
@@ -111,6 +111,10 @@ if (!command || command == "help" || command == "--help") {
console.log("Downloaded "+name);
});
}
} else if (command == "start" && instance === undefined) {
console.log("ERROR: No instanceName provided!");
console.log("Usage: node client.js start [instanceName]");
process.exit(0);
} else if (command == "start" && typeof instance == "string" && instance != "/" && !fs.existsSync(instancedirectory)) {
// if instance does not exist, create it
console.log("Creating instance...");
+1 -1
View File
@@ -63,7 +63,7 @@ describe("fileOps.js", function(){
});
describe("fileOps.getNewestFile()", function(){
it("gets the newest file in a directory async", function(done){
fileOps.getNewestFile("lib/test", fileOps.getFileNamesSync("lib/test"), function(err, newest){
fileOps.getNewestFile("lib/test/", fileOps.getFileNamesSync("lib/test"), function(err, newest){
assert(newest && typeof newest.file == "string");
done();
});
@@ -32,6 +32,7 @@ describe("inventoryImports/interfacingFunctions.js", function(){
"requestSlots":{
"iron-plate":100,
"steel-plate":480,
"raw-wood":20,
"bullshit":0,
}
}