mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-12 07:04:52 +09:00
Split up codebase into the packages @clsterio/lib, @clusterio/master, @clusterio/slave, and @clusterio/ctl using lerna to manage them. This will allow deployment to use only the parts needed reducing install size, and better separate the code into shared library, master, slave and control.
23 lines
724 B
JavaScript
23 lines
724 B
JavaScript
"use strict";
|
|
const assert = require("assert").strict;
|
|
const path = require("path");
|
|
|
|
const factorio = require("@clusterio/lib/factorio");
|
|
|
|
|
|
describe("lib/factorio/export", function() {
|
|
describe("exportLocale()", function() {
|
|
let testServer;
|
|
before(async function() {
|
|
let writePath = path.join("temp", "test", "server");
|
|
testServer = new factorio.FactorioServer(path.join("test", "file", "factorio"), writePath, {});
|
|
await testServer.init();
|
|
});
|
|
|
|
it("returns a flattened mapping with locale definitions", async function() {
|
|
let locale = await factorio._exportLocale(testServer, new Map(), ["base"], "en");
|
|
assert.deepEqual(locale, new Map([["test.key-a", "1"], ["test.key-b", "2"]]));
|
|
});
|
|
});
|
|
});
|