소스 검색

Fix Ammo JS Tests

sebavan 4 년 전
부모
커밋
0d3f2baafd
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      tests/unit/babylon/src/Physics/babylon.physicsComponents.tests.ts

+ 5 - 1
tests/unit/babylon/src/Physics/babylon.physicsComponents.tests.ts

@@ -2,6 +2,7 @@
 // 'physicsEngineComponents.ts' injects methods and properties into Scene and AbstractMesh
 // these tests only check that Scene and AbstractMesh have the expected methods.
 
+declare const Ammo: any;
 
 /**
  * Describes the test suite.
@@ -25,7 +26,10 @@ describe('Babylon physicsComponents', () => {
             .load(function() {
                 // Force apply promise polyfill for consistent behavior between chrome headless, IE11, and other browsers.
                 BABYLON.PromisePolyfill.Apply(true);
-                done();
+
+                Ammo().then(() => {
+                    done();
+                });
             });
     });