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(android): assert what bundletool prints, not what it was assumed to

yhh06857d2181e2
diff --git a/desktop/tests/android-aab.test.ts b/desktop/tests/android-aab.test.ts
index de9eaab76..02f34bfc0 100644
--- a/desktop/tests/android-aab.test.ts
+++ b/desktop/tests/android-aab.test.ts
@@ -235,6 +235,14 @@ describe('assembling an App Bundle', () => {
const out = execFileSync('java', ['-jar', bundletool, 'validate', `--bundle=${file}`], { encoding: 'utf8' });
- expect(out).toContain('com.example.demo');
+ // A non-zero exit throws, so arriving here is the verdict. What is left to
+ // check is that the bundle bundletool accepted is the one meant: `validate`
+ // reports the modules and their files (not the identity — that is asserted
+ // from the decoded manifest above).
+ expect(out).toContain('Feature module: base');
+ expect(out).toContain('File: res/mipmap-xxxhdpi/ic_launcher.png');
+ expect(out).toContain('File: dex/classes.dex');
+ expect(out).toContain('File: lib/arm64-v8a/libestella_js_host.so');
+ expect(out).toContain('File: assets/game.config.json');
});
});