feat(bgm): resolve relative part assets against source dir

This commit is contained in:
2026-08-09 21:19:37 +08:00
parent 43b69133cc
commit 0503ac84a7
3 changed files with 16 additions and 1 deletions
+3
View File
@@ -25,6 +25,9 @@ describe('collectPackages', () => {
});
expect(wood.face).toBe('./assets/tokens.png');
expect(wood.faceCrop).toEqual([1, 0, 5, 2]);
// Relative assets resolve against the source file's directory. The fixture
// markdown sits at the games root, so the virtual file is `parts/tokens.yaml`.
expect(wood.baseUrl).toBe('parts/');
// Two surfaces: the table board and its child player board.
expect([...harbor.surfaces.keys()].sort()).toEqual(['board#harbor', 'board#player']);