fix: use configured furni source and catalog assets
This commit is contained in:
1 parent
aed70db81f
commit
c78f8812ad
25 files changed
+368
-129
No files matched your search
@@ -0,0 +1,23 @@
|
||||
import path from "node:path";
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { catalogueAssetDirectories } from "@/lib/services/catalog-assets";
|
||||
|
||||
describe("catalogue asset directories", () => {
|
||||
it("prefers the configured Gamedata catalogue and retains the bundled fallback", () => {
|
||||
const cwd = path.join("test", "cms");
|
||||
const gamedataRoot = path.join("test", "Gamedata");
|
||||
|
||||
expect(catalogueAssetDirectories(gamedataRoot, cwd)).toEqual([
|
||||
path.join(gamedataRoot, "c_images", "catalogue"),
|
||||
path.join(cwd, "public", "swf", "c_images", "catalogue"),
|
||||
]);
|
||||
});
|
||||
|
||||
it("uses only the bundled catalogue when no Gamedata root is configured", () => {
|
||||
const cwd = path.join("test", "cms");
|
||||
|
||||
expect(catalogueAssetDirectories("", cwd)).toEqual([
|
||||
path.join(cwd, "public", "swf", "c_images", "catalogue"),
|
||||
]);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user