Skip to content

armgit / kiln

Public Imported from GitHub
0

Build and revise procedural 3D assets with your coding agent. Local MCP server, CLI and TypeScript engine with rendered review, editable source and GLB export.

Sort the export-root listing before comparing it (#305)

Matthew Kissinger16d1dceb6c97
diff --git a/src/export-root.test.ts b/src/export-root.test.ts
index 7f756203..0baf66bc 100644
--- a/src/export-root.test.ts
+++ b/src/export-root.test.ts
@@ -149,7 +149,8 @@ describe('export root writer', () => {
{ path: 'game/props/crate.glb', data: bytes('glb') },
]);
expect(await readFile(join(base, 'game', 'props', 'crate.glb'), 'utf8')).toBe('glb');
- expect(await readdir(join(base, 'game', 'props'))).toEqual([
+ // readdir makes no ordering guarantee; sort before comparing the pair.
+ expect((await readdir(join(base, 'game', 'props'))).sort()).toEqual([
'crate.glb',
'crate.kiln-metadata.json',
]);