mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-16 15:30:41 +09:00
Fix error on dash in instance name
Fix stripPaths logic breaking when the instance name contains RegExp meta characters due to a lack of escaping.
This commit is contained in:
1 parent
4c9b91ab57
commit
31c0925354
2 files changed
+11
-1
No files matched your search
@@ -170,6 +170,16 @@ describe("lib/factorio/server", function() {
|
||||
let writePath = path.join("temp", "test", "server");
|
||||
let server = new libFactorio.FactorioServer(path.join("test", "file", "factorio"), writePath, {});
|
||||
|
||||
describe("constructor()", function() {
|
||||
it("should handle dashes in write path with strapPaths enabled", function() {
|
||||
new libFactorio.FactorioServer(
|
||||
path.join("test", "file", "factorio"),
|
||||
path.join("temp", "test", "server-1"),
|
||||
{ stripPaths: true }
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe(".init()", function() {
|
||||
it("should not throw on first call", async function() {
|
||||
await server.init();
|
||||
|
||||
Reference in new issue
Block a user