Add command for copying static assets to a folder

This is useful in case the static assets are hosted by a separate web
server like Nginx, or for testing that the static_url option works as
intended.
This commit is contained in:
Hornwitser committed 2026-08-31 20:14:13 +02:00
1 parent 7c0d7faa24
commit 71f78c14a3
3 files changed
+72

No files matched your search

+19
View File
@@ -140,6 +140,25 @@ describe("Integration of Clusterio", function() {
});
});
describe("copy-static", function() {
it("should copy the files from dist/web/static", async function() {
const dir = "temp/test/copy-static";
await fs.rm(dir, { force: true, recursive: true, maxRetries: 10 });
await execController("copy-static copy-static");
const controllerFiles = await fs.readdir("packages/controller/dist/web/static");
const globalChatFiles = await fs.readdir("plugins/global_chat/dist/web/static");
const targetFiles = await fs.readdir(dir);
assert(
controllerFiles.every(name => targetFiles.includes(name)),
"Missing files from controller static folder",
);
assert(
globalChatFiles.every(name => targetFiles.includes(name)),
"Missing files from global_chat's static folder",
);
});
});
describe("config", function() {
it("can read the config file", async function() {
await execController("config list");