Throw Error objects in inventoryImports/interfacingFunctions

Change throwing of strings objcts to throw proper Error objects.
This commit is contained in:
Hornwitser committed 2019-08-24 11:25:40 +02:00
1 parent 940a7b9180
commit a39a17b220
2 files changed
+3 -3

No files matched your search

@@ -141,7 +141,7 @@ describe("inventoryImports/interfacingFunctions.js", function(){
it("Throws if player name is not a string", function(){
assert.throws(function(){
let x = functions.insertItemsFromObject(testObject, testObject);
}, "playerName is: 'object' instead of string!");
}, Error("playerName is: 'object' instead of string!"));
});
it("Returns a big factorio command as string", function(){
let x = functions.insertItemsFromObject(testObject, playerName);