mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-12 07:04:52 +09:00
Use a separate folder for the TypeScript build for Node.js in the dist folder. This makes each type of build consistently have its own output folder instead of being interleaved with the Node.js build.
24 lines
800 B
JavaScript
24 lines
800 B
JavaScript
"use strict";
|
|
const assert = require("assert").strict;
|
|
const path = require("path");
|
|
|
|
const { FactorioServer } = require("@clusterio/host/dist/node/src/server");
|
|
const { _exportLocale } = require("@clusterio/host/dist/node/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"]]));
|
|
});
|
|
});
|
|
});
|