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.
TypeScript 2d-game-engine3d3d-game-engineandroidcppecsgame-editorgame-enginegamedeviostypescriptwebassemblywebglwebgpuwechat-minigame
fix(tests): the identity test builds its App the way the class allows
yhhb99a1129a4c4
diff --git a/sdk/tests/native-module-identity.test.ts b/sdk/tests/native-module-identity.test.tsindex 3bb5c1927..e55c35423 100644--- a/sdk/tests/native-module-identity.test.ts+++ b/sdk/tests/native-module-identity.test.ts@@ -58,7 +58,7 @@ describe('native subpath modules resolve to this graph', () => {describe('identity, which is the whole point', () => {it('a resource installed by the runtime is found by the token a game imported', () => {- const app = new App();+ const app = App.new();// What installing physics3d does, reduced to the part identity depends on.app.insertResource(Physics3D, null);@@ -67,7 +67,7 @@ describe('identity, which is the whole point', () => {});it('a second bundle of the same module is NOT found — the failure this prevents', () => {- const app = new App();+ const app = App.new();app.insertResource(Physics3D, null);// Byte-for-byte what Physics3DPlugin.ts declares. Same name, same default,diff --git a/tools/check-native-subpath-imports.mjs b/tools/check-native-subpath-imports.mjsindex be84fa523..c10fb5b89 100644--- a/tools/check-native-subpath-imports.mjs+++ b/tools/check-native-subpath-imports.mjs@@ -111,7 +111,7 @@ for (const [spec, name] of Object.entries(${JSON.stringify(WITNESS)})) {}const p3 = reg?.['esengine/physics3d']?.Physics3D;const { App } = globalThis.ESEngine;-const app = new App();+const app = App.new();app.insertResource(p3, null);out.identity = app.hasResource(p3) === true;out.rivalRejected = app.hasResource(globalThis.ESEngine.defineResource(null, 'Physics3D')) === false;