Skip to content

A fast 2D and 3D game engine — TypeScript SDK, C++/WebAssembly core, visual editor. Ship one project to web, desktop, WeChat MiniGames, playable ads, and native Android / iOS.

fix: remove cross-package import in path tests causing CI type-check failure

esenginef6c9a6aeca09
diff --git a/editor/src/__tests__/utils/path.test.ts b/editor/src/__tests__/utils/path.test.ts
index aeefc5b83..98d8eed93 100644
--- a/editor/src/__tests__/utils/path.test.ts
+++ b/editor/src/__tests__/utils/path.test.ts
@@ -8,7 +8,6 @@ import {
getParentDir,
isAbsolutePath,
} from '../../utils/path';
-import { resolveFilePath } from '../../../../desktop/src/native-fs';
describe('Path utilities', () => {
describe('normalizePath', () => {
@@ -142,23 +141,23 @@ describe('Path utilities', () => {
});
});
- describe('resolveFilePath (desktop native-fs)', () => {
+ describe('resolvePath (path resolution)', () => {
it('should preserve leading slash for absolute paths', () => {
- expect(resolveFilePath('/Users/yhh/Documents/Spaceshooter/src/main.ts'))
+ expect(resolvePath('/Users/yhh/Documents/Spaceshooter/src/main.ts'))
.toBe('/Users/yhh/Documents/Spaceshooter/src/main.ts');
});
it('should resolve parent references in absolute paths', () => {
- expect(resolveFilePath('/Users/yhh/Documents/../Spaceshooter/src/main.ts'))
+ expect(resolvePath('/Users/yhh/Documents/../Spaceshooter/src/main.ts'))
.toBe('/Users/yhh/Spaceshooter/src/main.ts');
});
it('should handle relative paths without adding a leading slash', () => {
- expect(resolveFilePath('src/main.ts')).toBe('src/main.ts');
+ expect(resolvePath('src/main.ts')).toBe('src/main.ts');
});
it('should normalize backslashes', () => {
- expect(resolveFilePath('C:\\Users\\test\\file.ts')).toBe('C:/Users/test/file.ts');
+ expect(resolvePath('C:\\Users\\test\\file.ts')).toBe('C:/Users/test/file.ts');
});
});