瀏覽代碼

Chrome Headless unit tests

sebavan 6 年之前
父節點
當前提交
e733b014ff

+ 4 - 4
Tools/Gulp/tasks/gulpTasks-tests.js

@@ -93,7 +93,7 @@ gulp.task("tests-unit-debug", gulp.series("tests-unit-transpile", function(done)
 }));
 
 /**
- * Launches the KARMA unit tests in phantomJS.
+ * Launches the KARMA unit tests in chrome headless.
  */
 gulp.task("tests-babylon-unit", gulp.series("tests-unit-transpile", function(done) {
     var kamaServerOptions = {
@@ -207,7 +207,7 @@ gulp.task("tests-viewer-unit-debug", gulp.series("tests-viewer-transpile", funct
 }));
 
 /**
- * Launches the KARMA unit tests in phantomJS.
+ * Launches the KARMA unit tests in chrome headless.
  */
 gulp.task("tests-viewer-unit", gulp.series("tests-viewer-transpile", function(done) {
     var kamaServerOptions = {
@@ -220,12 +220,12 @@ gulp.task("tests-viewer-unit", gulp.series("tests-viewer-transpile", function(do
 }));
 
 /**
- * Launches the KARMA unit tests in phantomJS.
+ * Launches the KARMA unit tests in chrome headless.
  */
 gulp.task("tests-unit", gulp.series("tests-babylon-unit", "tests-viewer-unit"));
 
 /**
- * Launches the KARMA module tests in phantomJS.
+ * Launches the KARMA module tests in chrome headless.
  */
 gulp.task("tests-modules", function() {
     let testsToRun = require(relativeRootDir + 'tests/modules/tests.json');

+ 1 - 1
Viewer/tests/commons/boot.ts

@@ -57,7 +57,7 @@ export class Boot {
             DOMContentLoaded_event.initEvent("DOMContentLoaded", true, true);
             window.document.dispatchEvent(DOMContentLoaded_event);
 
-            // Disable Webgl2 support in test mode for Phantom/IE compatibility.
+            // Disable Webgl2 support in test mode for chrome headless/IE compatibility.
             viewerGlobals.disableWebGL2Support = true;
             done();
         });

+ 1 - 1
Viewer/tests/commons/mockWebGL.ts

@@ -1,5 +1,5 @@
 /**
- * This webGL Support shim will allow running tests using the normal engine in phantomjs.
+ * This webGL Support shim will allow running tests using the normal engine in chrome headless.
  */
 
 //Tests should be in the same condition no matter what environment they are running in.

+ 0 - 2
package.json

@@ -75,14 +75,12 @@
         "karma-chrome-launcher": "^2.2.0",
         "karma-firefox-launcher": "^1.1.0",
         "karma-mocha": "^1.3.0",
-        "karma-phantomjs-launcher": "^1.0.4",
         "karma-sinon": "^1.0.5",
         "merge2": "~1.2.2",
         "mini-css-extract-plugin": "^0.4.1",
         "minimist": "^1.2.0",
         "mocha": "^5.2.0",
         "node-sass": "^4.10.0",
-        "phantomjs-prebuilt": "^2.1.16",
         "plugin-error": "^1.0.1",
         "prompt": "^1.0.0",
         "re-resizable": "~4.9.1",

+ 1 - 1
tests/unit/babylon/babylon.example.tests.ts

@@ -18,7 +18,7 @@ describe('Example', function() {
             .useDist()
             .testMode()
             .load(function() {
-                // Force apply promise polyfill for consistent behavior between PhantomJS, IE11, and other browsers.
+                // Force apply promise polyfill for consistent behavior between chrome headless, IE11, and other browsers.
                 BABYLON.PromisePolyfill.Apply(true);
                 done();
             });

+ 1 - 1
tests/unit/babylon/serializers/babylon.glTFSerializer.tests.ts

@@ -13,7 +13,7 @@ describe('Babylon glTF Serializer', () => {
             .useDist()
             .testMode()
             .load(function() {
-                // Force apply promise polyfill for consistent behavior between PhantomJS, IE11, and other browsers.
+                // Force apply promise polyfill for consistent behavior between chrome headless, IE11, and other browsers.
                 BABYLON.PromisePolyfill.Apply(true);
                 done();
             });

+ 1 - 1
tests/unit/babylon/src/Animations/babylon.animation.tests.ts

@@ -13,7 +13,7 @@ describe('Babylon Animation', function() {
             .useDist()
             .testMode()
             .load(function() {
-                // Force apply promise polyfill for consistent behavior between PhantomJS, IE11, and other browsers.
+                // Force apply promise polyfill for consistent behavior between chrome headless, IE11, and other browsers.
                 BABYLON.PromisePolyfill.Apply(true);
                 done();
             });

+ 1 - 1
tests/unit/babylon/src/Animations/babylon.animationGroup.tests.ts

@@ -13,7 +13,7 @@ describe('Babylon Animation Group', function() {
             .useDist()
             .testMode()
             .load(function() {
-                // Force apply promise polyfill for consistent behavior between PhantomJS, IE11, and other browsers.
+                // Force apply promise polyfill for consistent behavior between chrome headless, IE11, and other browsers.
                 BABYLON.PromisePolyfill.Apply(true);
                 done();
             });

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

@@ -15,7 +15,7 @@ describe('Babylon Scene Loader', function() {
             .useDist()
             .testMode()
             .load(function() {
-                // Force apply promise polyfill for consistent behavior between PhantomJS, IE11, and other browsers.
+                // Force apply promise polyfill for consistent behavior between chrome headless, IE11, and other browsers.
                 BABYLON.PromisePolyfill.Apply(true);
                 BABYLON.Engine.audioEngine = new BABYLON.AudioEngine();
                 done();

+ 1 - 1
tests/unit/babylon/src/Material/babylon.material.tests.ts

@@ -13,7 +13,7 @@ describe('Babylon Material', function() {
             .useDist()
             .testMode()
             .load(function() {
-                // Force apply promise polyfill for consistent behavior between PhantomJS, IE11, and other browsers.
+                // Force apply promise polyfill for consistent behavior between chrome headless, IE11, and other browsers.
                 BABYLON.PromisePolyfill.Apply(true);
                 done();
             });

+ 1 - 1
tests/unit/babylon/src/Mesh/babylon.geometry.tests.ts

@@ -13,7 +13,7 @@ describe('Babylon Geometry', () => {
             .useDist()
             .testMode()
             .load(function() {
-                // Force apply promise polyfill for consistent behavior between PhantomJS, IE11, and other browsers.
+                // Force apply promise polyfill for consistent behavior between chrome headless, IE11, and other browsers.
                 BABYLON.PromisePolyfill.Apply(true);
                 done();
             });

+ 1 - 1
tests/unit/babylon/src/Mesh/babylon.mesh.vertexData.tests.ts

@@ -11,7 +11,7 @@ describe('Babylon Mesh Vertex Data', () => {
             .useDist()
             .testMode()
             .load(function() {
-                // Force apply promise polyfill for consistent behavior between PhantomJS, IE11, and other browsers.
+                // Force apply promise polyfill for consistent behavior between chrome headless, IE11, and other browsers.
                 BABYLON.PromisePolyfill.Apply(true);
                 done();
             });

+ 1 - 1
tests/unit/babylon/src/Mesh/babylon.positionAndRotation.tests.ts

@@ -13,7 +13,7 @@ describe('Babylon position and rotation', () => {
             .useDist()
             .testMode()
             .load(function() {
-                // Force apply promise polyfill for consistent behavior between PhantomJS, IE11, and other browsers.
+                // Force apply promise polyfill for consistent behavior between chrome headless, IE11, and other browsers.
                 BABYLON.PromisePolyfill.Apply(true);
                 done();
             });

+ 1 - 1
tests/unit/babylon/src/PostProcess/babylon.postProcess.tests.ts

@@ -15,7 +15,7 @@ describe('Babylon Scene Loader', function() {
             .useDist()
             .testMode()
             .load(function() {
-                // Force apply promise polyfill for consistent behavior between PhantomJS, IE11, and other browsers.
+                // Force apply promise polyfill for consistent behavior between chrome headless, IE11, and other browsers.
                 BABYLON.PromisePolyfill.Apply(true);
                 done();
             });

+ 1 - 1
tests/unit/babylon/src/Tools/babylon.promise.tests.ts

@@ -12,7 +12,7 @@ describe('Babylon.Promise', function() {
             .useDist()
             .testMode()
             .load(function() {
-                // Force apply promise polyfill for consistent behavior between PhantomJS, IE11, and other browsers.
+                // Force apply promise polyfill for consistent behavior between chrome headless, IE11, and other browsers.
                 BABYLON.PromisePolyfill.Apply(true);
                 done();
             });

+ 1 - 1
tests/unit/babylon/src/babylon.node.tests.ts

@@ -13,7 +13,7 @@ describe('Babylon Node', () => {
             .useDist()
             .testMode()
             .load(function() {
-                // Force apply promise polyfill for consistent behavior between PhantomJS, IE11, and other browsers.
+                // Force apply promise polyfill for consistent behavior between chrome headless, IE11, and other browsers.
                 BABYLON.PromisePolyfill.Apply(true);
                 done();
             });