fix: use JSON FurnitureData from gamedata
This commit is contained in:
1 parent
c78f8812ad
commit
ab43f5d63c
2 files changed
+23
-8
No files matched your search
@@ -20,7 +20,7 @@ vi.mock("@/lib/services/site-settings", () => ({
|
||||
siteSettings: { get: settingGetMock },
|
||||
}));
|
||||
|
||||
import { writeFurniData } from "./furni-data";
|
||||
import { getFurnitureDataPath, writeFurniData } from "./furni-data";
|
||||
|
||||
describe("writeFurniData production mirror", () => {
|
||||
let tempDir: string;
|
||||
@@ -60,4 +60,14 @@ describe("writeFurniData production mirror", () => {
|
||||
JSON.stringify(data),
|
||||
);
|
||||
});
|
||||
|
||||
it("resolves the default JSON file from the production Gamedata root", async () => {
|
||||
settingGetMock.mockImplementation(
|
||||
async (_key: string, fallback: string | null = null) => fallback,
|
||||
);
|
||||
|
||||
await expect(getFurnitureDataPath()).resolves.toBe(
|
||||
path.join(tempDir, "Gamedata", "config", "FurnitureData.json"),
|
||||
);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user