浏览代码

Tests: Clean up

Mugen87 6 年之前
父节点
当前提交
6ea4620505

+ 2 - 80
test/unit/src/renderers/WebGLRenderer.tests.js

@@ -5,45 +5,6 @@
 
 import { WebGLRenderer } from '../../../../src/renderers/WebGLRenderer';
 
-var customDocument = function () {
-
-	this.createElementNS = function ( namespace, elementName ) {
-
-		if ( namespace === "http://www.w3.org/1999/xhtml" && elementName === "canvas" ) {
-
-			return new customCanvas();
-
-		} else {
-
-			throw new Error( "customDocument.CreateElementNS has not implemented following element " + elementName + " from namespace " + namespace + "." );
-
-		}
-
-	};
-
-};
-
-var customCanvas = function () {
-
-	this.width = 200;
-	this.height = 200;
-	this.addEventListener = function () {};
-	this.getContext = function ( contextName ) {
-
-		if ( contextName === "webgl" ) {
-
-			return new customWebGLContext();
-
-		} else {
-
-			throw new Error( "customCanvas.getContext has not implemented following context " + contextName + "." );
-
-		}
-
-	};
-
-};
-
 var customWebGLContext = function () {
 
 	this.DEPTH_BUFFER_BIT = 256;
@@ -498,48 +459,9 @@ var customWebGLContext = function () {
 
 export default QUnit.module( 'Renderers', () => {
 
-	QUnit.module( 'WebGLRenderer', ( hooks ) => {
-
-		// You can invoke the hooks methods more than once.
-		hooks.beforeEach( function () {
-
-			global.__old__document__ = global.document;
-			global.document = new customDocument();
-
-		} );
-
-		hooks.afterEach( function () {
-
-			global.document = global.__old__document__;
-			global.__old__document__ = undefined;
-
-		} );
-
-
-		// INSTANCING
-		QUnit.test( "Instancing", ( assert ) => {
-
-			var webGLRenderer = new WebGLRenderer();
-			assert.ok( webGLRenderer, "webGLRenderer instanciated" );
-			assert.ok( webGLRenderer.domElement instanceof customCanvas, "webGLRenderer instanciated" );
-			assert.ok( webGLRenderer.context instanceof customWebGLContext, "webGLRenderer instanciated" );
-
-			var canvas = new customCanvas();
-			webGLRenderer = new WebGLRenderer( { canvas: canvas } );
-			assert.ok( webGLRenderer, "webGLRenderer instanciated" );
-			assert.ok( webGLRenderer.domElement === canvas, "webGLRenderer instanciated" );
-			assert.ok( webGLRenderer.context instanceof customWebGLContext, "webGLRenderer instanciated" );
-
-			var context = new customWebGLContext();
-			webGLRenderer = new WebGLRenderer( { canvas: canvas, context: context } );
-			assert.ok( webGLRenderer, "webGLRenderer instanciated" );
-			assert.ok( webGLRenderer.domElement === canvas, "webGLRenderer instanciated" );
-			assert.ok( webGLRenderer.context === context, "webGLRenderer instanciated" );
-
-		} );
+	QUnit.module( 'WebGLRenderer', () => {
 
-		// PUBLIC STUFF
-		QUnit.todo( "PrayForUs", ( assert ) => {
+		QUnit.todo( "Instancing", ( assert ) => {
 
 			assert.ok( false, "everything's gonna be alright" );
 

+ 0 - 7
test/unit/unittests_editor_toRemoveAfterEditorES6Refactoring.html

@@ -29,14 +29,7 @@
 <script src="../../editor/js/libs/app.js"></script>
 <script src="../../editor/js/Player.js"></script>
 <script src="../../editor/js/Script.js"></script>
-
-<!--
-<script src="../examples/js/effects/VREffect.js"></script>
-<script src="../examples/js/controls/VRControls.js"></script>
--->
-
 <script src="../../editor/js/Storage.js"></script>
-
 <script src="../../editor/js/Editor.js"></script>
 <script src="../../editor/js/Config.js"></script>
 <script src="../../editor/js/Loader.js"></script>