mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-16 07:24:53 +09:00
Source factorio dir from config-host.json in tests
If a factorio dir is configured in config-host.json then use that in the tests. This removes the requirement of having a factorio installation in ./factorio or linking to one there when running the tests.
This commit is contained in:
1 parent
f3150a9261
commit
5d97e8e816
3 files changed
+30
-5
No files matched your search
@@ -5,12 +5,14 @@ const path = require("path");
|
||||
const { _exportLocale } = require("@clusterio/host/dist/node/src/export");
|
||||
const { FactorioServer } = require("@clusterio/host/dist/node/src/server");
|
||||
|
||||
const { factorioDir } = require("./index");
|
||||
|
||||
|
||||
describe("Integration of lib/factorio/export", function() {
|
||||
describe("exportLocale()", function() {
|
||||
it("returns a nested Map with base game locale information", async function() {
|
||||
let writePath = path.join("temp", "test", "server");
|
||||
let testServer = new FactorioServer("factorio", writePath, {});
|
||||
let testServer = new FactorioServer(factorioDir, writePath, {});
|
||||
await testServer.init();
|
||||
|
||||
let locale = await _exportLocale(testServer, new Map(), ["base"], "en");
|
||||
|
||||
Reference in new issue
Block a user