mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-16 07:24:53 +09:00
Move Factorio server implementation to host
Move Factorio related code in lib that's only used by the host into the host package.
This commit is contained in:
1 parent
bc574ee1cb
commit
6af25e085c
13 files changed
+95
-100
No files matched your search
@@ -0,0 +1,23 @@
|
||||
"use strict";
|
||||
const assert = require("assert").strict;
|
||||
const path = require("path");
|
||||
|
||||
const { FactorioServer } = require("@clusterio/host/src/server");
|
||||
const { _exportLocale } = require("@clusterio/host/src/export");
|
||||
|
||||
|
||||
describe("host/src/export", function() {
|
||||
describe("exportLocale()", function() {
|
||||
let testServer;
|
||||
before(async function() {
|
||||
let writePath = path.join("temp", "test", "server");
|
||||
testServer = new FactorioServer(path.join("test", "file", "factorio"), writePath, {});
|
||||
await testServer.init();
|
||||
});
|
||||
|
||||
it("returns a flattened mapping with locale definitions", async function() {
|
||||
let locale = await _exportLocale(testServer, new Map(), ["base"], "en");
|
||||
assert.deepEqual(locale, new Map([["test.key-a", "1"], ["test.key-b", "2"]]));
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user