فهرست منبع

Fix incorrect render loop code in loader tests

Gary Hsu 5 سال پیش
والد
کامیت
5292b23f15
1فایلهای تغییر یافته به همراه5 افزوده شده و 5 حذف شده
  1. 5 5
      tests/unit/babylon/src/Loading/babylon.sceneLoader.tests.ts

+ 5 - 5
tests/unit/babylon/src/Loading/babylon.sceneLoader.tests.ts

@@ -139,7 +139,7 @@ describe('Babylon Scene Loader', function() {
                     disposed = true;
                 };
 
-                promises.push(BABYLON.Tools.DelayAsync(50).then(() => {
+                promises.push(BABYLON.Tools.DelayAsync(1).then(() => {
                     loader.dispose();
                     expect(ready, "ready").to.be.false;
                     expect(disposed, "disposed").to.be.true;
@@ -147,7 +147,7 @@ describe('Babylon Scene Loader', function() {
             });
 
             const scene = new BABYLON.Scene(subject);
-            promises.push(BABYLON.SceneLoader.AppendAsync("/Playground/scenes/BoomBox/", "BoomBox2.gltf", scene).then(() => {
+            promises.push(BABYLON.SceneLoader.AppendAsync("/Playground/scenes/BoomBox/", "BoomBox.gltf", scene).then(() => {
                 ready = true;
             }));
 
@@ -184,7 +184,7 @@ describe('Babylon Scene Loader', function() {
             subject.runRenderLoop(() => {
                 for (const mesh of scene.meshes) {
                     if (mesh.material && mesh.isEnabled()) {
-                        expect(mesh.material.isReady(mesh), "mesh material is ready").to.be.true;
+                        expect(mesh.isReady(true), "mesh is ready").to.be.true;
                     }
                 }
             });
@@ -214,7 +214,7 @@ describe('Babylon Scene Loader', function() {
             subject.runRenderLoop(() => {
                 for (const mesh of scene.meshes) {
                     if (mesh.material && mesh.isEnabled()) {
-                        expect(mesh.material.isReady(mesh), "mesh material is ready").to.be.true;
+                        expect(mesh.isReady(true), "mesh is ready").to.be.true;
                     }
                 }
             });
@@ -283,7 +283,7 @@ describe('Babylon Scene Loader', function() {
             subject.runRenderLoop(() => {
                 for (const mesh of scene.meshes) {
                     if (mesh.material && mesh.isEnabled()) {
-                        expect(mesh.material.isReady(mesh), "mesh material is ready").to.be.true;
+                        expect(mesh.isReady(true), "mesh is ready").to.be.true;
                     }
                 }
             });