浏览代码

Tests: Fixed fails with "npm run test"

Mugen87 7 年之前
父节点
当前提交
71af055d62

+ 7 - 0
test/unit/src/core/BufferGeometry.tests.js

@@ -547,6 +547,13 @@ export default QUnit.module( 'Core', () => {
 
 		QUnit.test( "fromGeometry/fromDirectGeometry", ( assert ) => {
 
+			if ( typeof XMLHttpRequest === 'undefined' ) {
+
+				assert.expect( 0 );
+				return;
+
+			}
+
 			assert.timeout( 1000 );
 
 			var a = new BufferGeometry();

+ 7 - 0
test/unit/src/core/Clock.tests.js

@@ -66,6 +66,13 @@ export default QUnit.module( 'Core', () => {
 		// OTHERS
 		QUnit.test( "clock with performance", ( assert ) => {
 
+			if ( typeof performance === 'undefined' ) {
+
+				assert.expect( 0 );
+				return;
+
+			}
+
 			mockPerformance();
 
 			var clock = new Clock( false );

+ 7 - 0
test/unit/src/core/DirectGeometry.tests.js

@@ -48,6 +48,13 @@ export default QUnit.module( 'Core', () => {
 
 		QUnit.test( "fromGeometry", ( assert ) => {
 
+			if ( typeof XMLHttpRequest === 'undefined' ) {
+
+				assert.expect( 0 );
+				return;
+
+			}
+
 			assert.timeout( 1000 );
 
 			var a = new DirectGeometry();